IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 16 years ago

Closed 16 years ago

#1363 closed defect (fixed)

Conflicting defintions of Fseek (PROTO)

Reported by: Michael Wood-Vasey Owned by: eugene
Priority: normal Milestone:
Component: Ohana Version:
Severity: normal Keywords:
Cc:

Description

Current trunk Ohana fails to compile under gcc-4.2 with the message below. I believe the issue is defining Fseek as a PROTO type isn't portably supported.

Ohana/src/libohana/src/findexec.c
int Fseek (FILE *f, off_t offset, int whence) {

Ohana/src/libohana/include/ohana.h
int Fseek PROTO((FILE *f, long offset, int whence));

---
gcc-4.2 -O2 -D_DARWIN_C_SOURCE -fPIC -DHAVE_MYSQL_H -I/Volumes/data/PS1/src/ipp-2.9/Ohana/src/libohana/include -I/Volumes/data/PS1/code/ipp-2.9/default.darwin_x86/include -I/usr/include -I/Volumes/data/PS1/code/ipp-2.9/default.darwin_x86/include -I/Volumes/data/PS1/code/ipp-2.9/default.darwin_x86/include/mysql -Ddarwin_x86 -c /Volumes/data/PS1/src/ipp-2.9/Ohana/src/libohana/src/config.c -o /Volumes/data/PS1/src/ipp-2.9/Ohana/src/libohana/src/config.darwin_x86.o
/Volumes/data/PS1/src/ipp-2.9/Ohana/src/libohana/src/findexec.c:393: error: conflicting types for ‘Fseek’
/Volumes/data/PS1/src/ipp-2.9/Ohana/src/libohana/include/ohana.h:191: error: previous declaration of ‘Fseek’ was here
make[3]: * Volumes/data/PS1/src/ipp-2.9/Ohana/src/libohana/src/findexec.darwin_x86.o Error 1

Change History (1)

comment:1 by eugene, 16 years ago

Resolution: fixed
Status: newclosed

This is just a problem of mismatched prototypes (long vs off_t). (PROTO is just a wrapper to allow no prototyping for very old compilers -- on modern compilers it is a NOP). But, there is a second related concern that off_t is a type which is only required to be 64bit if large-file support is requested. This (LFS) should be the default for Ohana. I've fixed the above prototype, and also now have the configuration script call:

getconf LFS_CFLAGS

to get the correct set of flags. the configure option '--no-largefiles' is provided to disable this if desired.

Note: See TracTickets for help on using tickets.