Simplify my *-tests modules.
[gnulib.git] / lib / tempname.c
index df46fc2..3c9f59b 100644 (file)
@@ -15,9 +15,9 @@
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
@@ -47,9 +47,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#if HAVE_FCNTL_H || _LIBC
-# include <fcntl.h>
-#endif
+#include <fcntl.h>
 
 #if HAVE_SYS_TIME_H || _LIBC
 # include <sys/time.h>
@@ -62,9 +60,7 @@
 # include <inttypes.h>
 #endif
 
-#if HAVE_UNISTD_H || _LIBC
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include <sys/stat.h>
 
@@ -78,8 +74,8 @@
 # define __mkdir mkdir
 # define __open open
 # define __open64 open
-# define __lxstat64(version, path, buf) lstat (path, buf)
-# define __xstat64(version, path, buf) stat (path, buf)
+# define __lxstat64(version, file, buf) lstat (file, buf)
+# define __xstat64(version, file, buf) stat (file, buf)
 #endif
 
 #if ! (HAVE___SECURE_GETENV || _LIBC)
@@ -185,7 +181,7 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
   return 0;
 }
 
-/* These are the characters used in temporary filenames.  */
+/* These are the characters used in temporary file names.  */
 static const char letters[] =
 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";