Date: Thu, 8 Jan 2004 16:33:50 -0500 From: Craig Rodrigues <rodrigc@crodrigues.org> To: Mark Linimon <linimon@lonesome.com> Cc: harbour@netfang.net Subject: Re: ports/52016: New port: lang/harbour - A Clipper-compatible compiler Message-ID: <20040108213350.GA41844@crodrigues.org> In-Reply-To: <200401081510.39015.linimon@lonesome.com> References: <200401081510.39015.linimon@lonesome.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Look at the latest POSIX spec here: http://www.opengroup.org/onlinepubs/007904975/basedefs/unistd.h.html According to that web page, macros such as _POSIX_SYNCHRONIZED_IO can have values of -1, 0, or > 0. If the constant is defined to be -1, then that means the feature is not supported. ( This is what it is defined as on FreeBSD, insdie <sys/unistd.h> ). You need to change the code in your port to do something like: #if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0) /* Use the fdatasync or whatever here */ #endif On Thu, Jan 08, 2004 at 03:10:39PM -0600, Mark Linimon wrote: > [mcl's cited compile error:] > > > ../../../../source/rtl/bsd/gcc/librtl.a(filesys.o): In function > > `hb_fsCommit': > > /usr/ports/lang/harbour/work/harbour/source/rtl/bsd/gcc/../../filesys.c:14 > >92: undefined reference to `fdatasync' > > [the submitter replied:] > > The hb_fsCommit function in filesys.c only attempts to use fdatasync if > _POSIX_SYNCHRONIZED_IO is defined, so this error appears to be due to a bug > in the POSIX library implementation in GCC on -current. The fdatasync > function is a POSIX function that appears to me to be mandated to be > present, even if unimplemented, if _POSIX_SYNCHRONIZED_IO is defined in > unistd.h. > > I'm not sure if I should add a FreeBSD-specific workaround for the second > error based on certain (currently unknown to me) values of __GNUC__ or > what... > > ------------------------------------------------------- > > _______________________________________________ > freebsd-standards@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-standards > To unsubscribe, send any mail to "freebsd-standards-unsubscribe@freebsd.org" -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040108213350.GA41844>