X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fopenat.c;h=18491a6f6d980f83533db563ee0ed4089283e165;hb=3d50b6043ac61690f0b163a1618cfd5516238c81;hp=9970e460ab48a4538354eabdce7499aade64cda9;hpb=24816be6c14cbc51938d036533ec5ccaa9a056e2;p=gnulib.git diff --git a/lib/openat.c b/lib/openat.c index 9970e460a..18491a6f6 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004-2010 Free Software Foundation, Inc. + Copyright (C) 2004-2011 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,7 +25,7 @@ #include #include -#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ #include "openat-priv.h" #include "save-cwd.h" @@ -53,7 +53,7 @@ rpl_openat (int dfd, char const *filename, int flags, ...) va_end (arg); } -#if OPEN_TRAILING_SLASH_BUG +# if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. Rationale: POSIX @@ -84,11 +84,11 @@ rpl_openat (int dfd, char const *filename, int flags, ...) return -1; } } -#endif +# endif fd = openat (dfd, filename, flags, mode); -#if OPEN_TRAILING_SLASH_BUG +# if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. Rationale: POSIX @@ -117,7 +117,7 @@ rpl_openat (int dfd, char const *filename, int flags, ...) } } } -#endif +# endif return fd; }