about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-01 11:09:48 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-01 11:09:48 -0700
commit3f55550c148593f4a0db9eec939554bcf3f0bcd4 (patch)
treec7e878c53c85055fd2855d0f91a8bd2bc72980a4 /misc
parent48aec5b988f420a36ee4549865f9525584faa336 (diff)
downloadglibc-3f55550c148593f4a0db9eec939554bcf3f0bcd4.tar.gz
glibc-3f55550c148593f4a0db9eec939554bcf3f0bcd4.tar.xz
glibc-3f55550c148593f4a0db9eec939554bcf3f0bcd4.zip
Clean up mkstemps64 definition for O_LARGEFILE==0.
Diffstat (limited to 'misc')
-rw-r--r--misc/mkstemps.c6
-rw-r--r--misc/mkstemps64.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/misc/mkstemps.c b/misc/mkstemps.c
index 26205dc1bb..79418c58df 100644
--- a/misc/mkstemps.c
+++ b/misc/mkstemps.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,7 @@ mkstemps (template, suffixlen)
 
   return __gen_tempname (template, suffixlen, 0, __GT_FILE);
 }
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkstemps, mkstemps64)
+#endif
diff --git a/misc/mkstemps64.c b/misc/mkstemps64.c
index b4af7ca407..8393a516d1 100644
--- a/misc/mkstemps64.c
+++ b/misc/mkstemps64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+/* If O_LARGEFILE is zero, mkstemps.c defines mkstemps64 as an alias.  */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
 /* Generate a unique temporary file name from TEMPLATE.  The last six
    characters before a suffix of length SUFFIXLEN of TEMPLATE must be
    "XXXXXX"; they are replaced with a string that makes the filename
@@ -37,3 +40,5 @@ mkstemps64 (template, suffixlen)
 
   return __gen_tempname (template, suffixlen, O_LARGEFILE, __GT_FILE);
 }
+
+#endif