[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#119974: Bug confirmed

tag 119974 + pending

  I checked in the POSIX doc, FWIW here is what I found:

  fsync was first introduced it seems as an XOPEN extension. Hence the
__USE_XOPEN guard, and defining _XOPEN_SOURCE indeed works.

  Else, wrt POSIX, fsync last updates are in posix 1003.1-2001.

> Just saying POSIX does not tell you if its POSIX.1 or POSIX.1b.  Given
> the current messy use of test macros, it would be natural to think POSIX
> refers to whatever _POSIX_SOURCE buys you by default (POSIX.1);
> otherwise the manual page would state clearly the standard revision so
> you could define the test macro to the appropiate number.  On the other
> hand, the fsync(2) manual page (which I had read) clearly labels fsync()
> as POSIX.1b, so I was a bit confused for the precise revision, but it is
> clearly a POSIX function.

  Current man page advertise it as POSIX 1003.1-2001 which is correct.

  So FWIW compiling with:
  gcc -ansi -Wall -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=200112 a.c

  should work. The correct fix is to add an || defined(__USE_POSIX2K) in
the guard.

·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpQ2I9bVQykI.pgp
Description: PGP signature

Reply to: