summaryrefslogtreecommitdiff
path: root/lib/chdir-long.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-09-01 12:25:01 -0600
committerEric Blake <ebb9@byu.net>2009-09-02 20:33:22 -0600
commitfc333501ca97880108c8ff17e33d9dd7d5e28ed4 (patch)
tree07c376828675d6e9d737cf1e5bbc1e4345eb23e6 /lib/chdir-long.c
parent02fd4eb4561842dee666b709fbbb1632c4357d2d (diff)
downloadgnulib-fc333501ca97880108c8ff17e33d9dd7d5e28ed4.tar.gz
backupfile, chdir-long, fts, savedir: make safer
* lib/backupfile.c (includes): Use "dirent--.h", since numbered_backup can write to stderr during readdir. * lib/savedir.c (includes): Likewise. * lib/chdir-long.c (includes): Use "fcntl--.h", since openat emulation can write to stderr on failure. * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat. * lib/getcwd.c: Document why opendir_safer is unused. * lib/glob.c: Likewise. * lib/scandir.c: Likewise. * lib/openat-proc.c: Likewise, for open_safer. * modules/backupfile (Depends-on): Add dirent-safer. * modules/savedir (Depends-on): Likewise. * modules/fts (Depends-on): Add dirent-safer and openat-safer. * modules/chdir-long (Depends-on): Add openat-safer. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/chdir-long.c')
-rw-r--r--lib/chdir-long.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chdir-long.c b/lib/chdir-long.c
index 291b58c289..ba47d59973 100644
--- a/lib/chdir-long.c
+++ b/lib/chdir-long.c
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004-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
@@ -20,7 +20,6 @@
#include "chdir-long.h"
-#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
@@ -28,7 +27,7 @@
#include <stdio.h>
#include <assert.h>
-#include "openat.h"
+#include "fcntl--.h"
#ifndef PATH_MAX
# error "compile this file only if your system defines PATH_MAX"