Mercurial > hg > octave-jordi > gnulib-hg
comparison lib/unlinkat.c @ 15499:399fbe0ffbc2
openat: Fix warnings and commens when building unlinkat.c on Hurd.
* lib/unlinkat.c: Mention Hurd in comments. Include stdlib.h to
get prototype for free.
author | Simon Josefsson <simon@josefsson.org> |
---|---|
date | Fri, 05 Aug 2011 13:27:17 +0200 |
parents | 9f47f8c334f2 |
children | 8250f2777afc |
comparison
equal
deleted
inserted
replaced
15498:7ed7c0ea6e5f | 15499:399fbe0ffbc2 |
---|---|
1 /* Work around unlinkat bugs on Solaris 9. | 1 /* Work around unlinkat bugs on Solaris 9 and Hurd. |
2 | 2 |
3 Copyright (C) 2009-2011 Free Software Foundation, Inc. | 3 Copyright (C) 2009-2011 Free Software Foundation, Inc. |
4 | 4 |
5 This program is free software: you can redistribute it and/or modify | 5 This program is free software: you can redistribute it and/or modify |
6 it under the terms of the GNU General Public License as published by | 6 it under the terms of the GNU General Public License as published by |
24 #include <errno.h> | 24 #include <errno.h> |
25 #include <fcntl.h> | 25 #include <fcntl.h> |
26 #include <string.h> | 26 #include <string.h> |
27 #include <sys/stat.h> | 27 #include <sys/stat.h> |
28 | 28 |
29 #include <stdlib.h> | |
30 | |
29 #include "dosname.h" | 31 #include "dosname.h" |
30 #include "openat.h" | 32 #include "openat.h" |
31 | 33 |
32 #if HAVE_UNLINKAT | 34 #if HAVE_UNLINKAT |
33 | 35 |
34 # undef unlinkat | 36 # undef unlinkat |
35 | 37 |
36 /* unlinkat without AT_REMOVEDIR does not honor trailing / on Solaris | 38 /* unlinkat without AT_REMOVEDIR does not honor trailing / on Solaris |
37 9. Solve it in a similar manner to unlink. */ | 39 9. Solve it in a similar manner to unlink. Hurd has the same |
40 issue. */ | |
38 | 41 |
39 int | 42 int |
40 rpl_unlinkat (int fd, char const *name, int flag) | 43 rpl_unlinkat (int fd, char const *name, int flag) |
41 { | 44 { |
42 size_t len; | 45 size_t len; |