From 5a86df4fc8c276317452b6b5f595f187c54199ce Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 25 Apr 2007 06:46:57 +0000 Subject: [PATCH] Ensure that and define SEEK_CUR etc. --- ChangeLog | 7 +++++++ lib/unistd_.h | 5 +++++ tests/test-fcntl.c | 3 +++ tests/test-stdio.c | 3 +++ tests/test-unistd.c | 3 +++ 5 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0c552c2ed..33c7d57fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-04-25 Bruno Haible + + * lib/unistd_.h: Include if needed to get the SEEK_* macros. + * tests/test-stdio.c: Check that the various SEEK_* macros are defined. + * tests/test-unistd.c: Likewise. + * tests/test-fcntl.c: Likewise. + 2007-04-23 Eric Blake * lib/fflush.c: Fix missing include. diff --git a/lib/unistd_.h b/lib/unistd_.h index 77df86116..344b5a388 100644 --- a/lib/unistd_.h +++ b/lib/unistd_.h @@ -22,6 +22,11 @@ # include @ABSOLUTE_UNISTD_H@ #endif +/* mingw doesn't define the SEEK_* macros in . */ +#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) +# include +#endif + /* The definition of GL_LINK_WARNING is copied here. */ diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c index cc956688e..21f67cf11 100644 --- a/tests/test-fcntl.c +++ b/tests/test-fcntl.c @@ -26,6 +26,9 @@ int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_BINARY | O_TEXT; +/* Check that the various SEEK_* macros are defined. */ +int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; + int main () { diff --git a/tests/test-stdio.c b/tests/test-stdio.c index 3f97c9d8f..96ea59a2d 100644 --- a/tests/test-stdio.c +++ b/tests/test-stdio.c @@ -21,6 +21,9 @@ #include +/* Check that the various SEEK_* macros are defined. */ +int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; + int main () { diff --git a/tests/test-unistd.c b/tests/test-unistd.c index a81bd7a58..755708ac0 100644 --- a/tests/test-unistd.c +++ b/tests/test-unistd.c @@ -21,6 +21,9 @@ #include +/* Check that the various SEEK_* macros are defined. */ +int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; + int main () { -- 2.11.0