X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffcntl.in.h;h=99f75e60fd4100ca239d1f68273ab13cfe28c626;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=ce7c8c016cb29f26d157aaff7402d276b929efe3;hpb=b6772983c800c6faee7fc793b83975afb6d58bcc;p=gnulib.git diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index ce7c8c016..99f75e60f 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -1,6 +1,6 @@ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,6 +25,8 @@ #if defined __need_system_fcntl_h /* Special invocation convention. */ +/* Needed before . + May also define off_t to a 64-bit type on native Windows. */ #include /* On some systems other than glibc, is a prerequisite of . On glibc systems, we would like to avoid namespace pollution. @@ -40,8 +42,10 @@ #else /* Normal invocation convention. */ -#ifndef _GL_FCNTL_H +#ifndef _@GUARD_PREFIX@_FCNTL_H +/* Needed before . + May also define off_t to a 64-bit type on native Windows. */ #include /* On some systems other than glibc, is a prerequisite of . On glibc systems, we would like to avoid namespace pollution. @@ -55,13 +59,19 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ -#ifndef _GL_FCNTL_H -#define _GL_FCNTL_H +#ifndef _@GUARD_PREFIX@_FCNTL_H +#define _@GUARD_PREFIX@_FCNTL_H #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif +/* Native Windows platforms declare open(), creat() in . */ +#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -177,12 +187,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " /* Fix up the O_* macros. */ #if !defined O_DIRECT && defined O_DIRECTIO -/* Tru64 spells it `O_DIRECTIO'. */ +/* Tru64 spells it 'O_DIRECTIO'. */ # define O_DIRECT O_DIRECTIO #endif #if !defined O_CLOEXEC && defined O_NOINHERIT -/* Mingw spells it `O_NOINHERIT'. */ +/* Mingw spells it 'O_NOINHERIT'. */ # define O_CLOEXEC O_NOINHERIT #endif @@ -206,6 +216,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define O_EXEC O_RDONLY /* This is often close enough in older systems. */ #endif +#ifndef O_IGNORE_CTTY +# define O_IGNORE_CTTY 0 +#endif + #ifndef O_NDELAY # define O_NDELAY 0 #endif @@ -239,10 +253,18 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define O_NOFOLLOW 0 #endif +#ifndef O_NOLINK +# define O_NOLINK 0 +#endif + #ifndef O_NOLINKS # define O_NOLINKS 0 #endif +#ifndef O_NOTRANS +# define O_NOTRANS 0 +#endif + #ifndef O_RSYNC # define O_RSYNC 0 #endif @@ -259,7 +281,7 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define O_TTY_INIT 0 #endif -#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) +#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) # undef O_ACCMODE # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) #endif @@ -320,6 +342,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " #endif -#endif /* _GL_FCNTL_H */ -#endif /* _GL_FCNTL_H */ +#endif /* _@GUARD_PREFIX@_FCNTL_H */ +#endif /* _@GUARD_PREFIX@_FCNTL_H */ #endif