ports/52016: New port: lang/harbour - A Clipper-compatible compiler

Craig Rodrigues rodrigc at crodrigues.org
Thu Jan 8 13:34:02 PST 2004


Look at the latest POSIX spec here:

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:


 /* Use the fdatasync or whatever here */


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-standards
> To unsubscribe, send any mail to "freebsd-standards-unsubscribe at freebsd.org"

Craig Rodrigues        
rodrigc at crodrigues.org

More information about the freebsd-standards mailing list