[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_SYS_LARGEFILE
From: |
Peter Simons |
Subject: |
Re: AC_SYS_LARGEFILE |
Date: |
Thu, 10 Jan 2002 15:54:54 +0100 |
Albert Chin writes:
> So, if your program uses open(2) and you link, you get an
> unresolved reference to the symbol open?
No, the header files doesn't even define the open(2) prototype
anymore, thus compilation fails:
| g++ -DBYTE_ORDER=BIG_ENDIAN -Du_int32_t=uint32_t -Ilibgetopt \
| -DWORDS_BIGENDIAN=1 -D_FILE_OFFSET_BITS=64 \
| -c address-db.cc -o address-db.o
| address-db.cc: In method `AddressDB::AddressDB(const string &)':
| address-db.cc:24: implicit declaration of function `int open(...)'
| *** Error code 1
The source file address-db.cc includes the files:
| // POSIX.1 system headers.
| #include <sys/types.h>
| #include <sys/stat.h>
| #include <fcntl.h>
| #include <unistd.h>
so surely open() should be there. But it appears that Solaris somehow
redefines the prototypes. When I generate the pre-processor output
with the "-E" flag, I see:
| [...]
| # 68 "/usr/include/fcntl.h" 3 4
|
| extern int fcntl(int, int, ...);
| extern int open64 (const char *, int, ...);
| extern int creat64 (const char *, mode_t);
| [...]
Maybe there's some other magic define that will fix it?
-peter