X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Ffcntl.in.h;h=8a1668c3743af6c2c2d7bef96343fb2ed8cb6eed;hb=4aa85f09e755fc827cd5ab6225f20c83cd42245d;hp=c7d871bfc416c760dcd0f73ccef34272a3ec9304;hpb=1a44d77d50f4fb37c0410eed04b82303624ea2ec;p=debian%2Ftar diff --git a/gnu/fcntl.in.h b/gnu/fcntl.in.h index c7d871bf..8a1668c3 100644 --- a/gnu/fcntl.in.h +++ b/gnu/fcntl.in.h @@ -2,7 +2,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* 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 @@ -27,6 +27,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. @@ -42,8 +44,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. @@ -57,13 +61,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. */ @@ -179,13 +189,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'. Intentionally leave it - undefined if not available. */ +/* Mingw spells it 'O_NOINHERIT'. */ # define O_CLOEXEC O_NOINHERIT #endif @@ -209,6 +218,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 @@ -221,6 +234,19 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define O_NONBLOCK O_NDELAY #endif +/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero + value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY + or to 0 as fallback. */ +#if @GNULIB_NONBLOCKING@ +# if O_NONBLOCK +# define GNULIB_defined_O_NONBLOCK 0 +# else +# define GNULIB_defined_O_NONBLOCK 1 +# undef O_NONBLOCK +# define O_NONBLOCK 0x40000000 +# endif +#endif + #ifndef O_NOCTTY # define O_NOCTTY 0 #endif @@ -229,10 +255,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 @@ -249,6 +283,11 @@ _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) +# undef O_ACCMODE +# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) +#endif + /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in fcntl.h */ #if !defined O_BINARY && defined _O_BINARY @@ -305,6 +344,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