diff options
author | Eric Blake <ebb9@byu.net> | 2009-09-01 07:41:28 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-09-02 19:14:53 -0600 |
commit | 4f1227bdeac3e4e18c9b3efb27623875e02d681d (patch) | |
tree | e77970365b2c7c9284cef867ffde173f84c501c8 /lib/dirent-safer.h | |
parent | eeb36a484013c26402222f677f53a20e3f8488e2 (diff) | |
download | gnulib-4f1227bdeac3e4e18c9b3efb27623875e02d681d.tar.gz |
dirent-safer: new module
* modules/dirent-safer: New file.
* lib/dirent--.h: Likewise.
* lib/dirent-safer.h: Likewise.
* lib/opendir-safer.c: Likewise.
* m4/dirent-safer.m4: Likewise.
* MODULES.html.sh (Enhancements for POSIX:2008): Mention it.
* modules/dirent-safer-tests: New test.
* tests/test-dirent-safer.c: New file.
* lib/fdopendir.c (includes): Ensure fdopendir is also safe.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/dirent-safer.h')
-rw-r--r-- | lib/dirent-safer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/dirent-safer.h b/lib/dirent-safer.h new file mode 100644 index 0000000000..0debe26bf7 --- /dev/null +++ b/lib/dirent-safer.h @@ -0,0 +1,22 @@ +/* Invoke dirent-like functions, but avoid some glitches. + + Copyright (C) 2009 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Eric Blake. */ + +#include <dirent.h> + +DIR *opendir_safer (const char *name); |