summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--misc/mkostemp.c6
-rw-r--r--misc/mkostemp64.c7
-rw-r--r--misc/mkstemp.c6
-rw-r--r--misc/mkstemp64.c7
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c1
-rw-r--r--sysdeps/wordsize-64/mkostemp.c3
-rw-r--r--sysdeps/wordsize-64/mkostemp64.c1
-rw-r--r--sysdeps/wordsize-64/mkstemp.c3
-rw-r--r--sysdeps/wordsize-64/mkstemp64.c1
13 files changed, 38 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index cacc65cd46..63a35209cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2012-08-01 Roland McGrath <roland@hack.frob.com>
+ * misc/mkstemp.c [!defined O_LARGEFILE || O_LARGEFILE == 0]:
+ Define mkstemp64 as an alias.
+ * misc/mkostemp.c [!defined O_LARGEFILE || O_LARGEFILE == 0]:
+ Define mkostemp64 as an alias.
+ * misc/mkstemp64.c [defined O_LARGEFILE && O_LARGEFILE != 0]:
+ Conditionalize body on this.
+ * misc/mkostemp64.c: Likewise.
+ * sysdeps/wordsize-64/mkstemp64.c: File removed.
+ * sysdeps/wordsize-64/mkostemp64.c: File removed.
+ * sysdeps/wordsize-64/mkostemp.c: File removed.
+ * sysdeps/wordsize-64/mkstemp.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c: File removed.
+
[BZ #14138]
* sysdeps/unix/sysv/linux/syscalls.list: Add getrlimit/ugetrlimit line.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: File removed.
diff --git a/misc/mkostemp.c b/misc/mkostemp.c
index b78554bd01..2c5b272537 100644
--- a/misc/mkostemp.c
+++ b/misc/mkostemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998-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
@@ -33,3 +33,7 @@ mkostemp (template, flags)
{
return __gen_tempname (template, 0, flags, __GT_FILE);
}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkostemp, mkostemp64)
+#endif
diff --git a/misc/mkostemp64.c b/misc/mkostemp64.c
index b7a803a932..104e6d98ad 100644
--- a/misc/mkostemp64.c
+++ b/misc/mkostemp64.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
@@ -19,6 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* If O_LARGEFILE is zero, mkostemp.c defines mkostemp64 as an alias. */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique.
@@ -30,3 +33,5 @@ mkostemp64 (template, flags)
{
return __gen_tempname (template, 0, flags | O_LARGEFILE, __GT_FILE);
}
+
+#endif
diff --git a/misc/mkstemp.c b/misc/mkstemp.c
index c03516bb7b..c10bdd9af0 100644
--- a/misc/mkstemp.c
+++ b/misc/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998-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
@@ -32,3 +32,7 @@ mkstemp (template)
{
return __gen_tempname (template, 0, 0, __GT_FILE);
}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkstemp, mkstemp64)
+#endif
diff --git a/misc/mkstemp64.c b/misc/mkstemp64.c
index ba4a6e28f5..3667c4b95f 100644
--- a/misc/mkstemp64.c
+++ b/misc/mkstemp64.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
@@ -19,6 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* If O_LARGEFILE is zero, mkstemp.c defines mkstemp64 as an alias. */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique.
@@ -29,3 +32,5 @@ mkstemp64 (template)
{
return __gen_tempname (template, 0, O_LARGEFILE, __GT_FILE);
}
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c
deleted file mode 100644
index 177f68a550..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkostemp.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c
deleted file mode 100644
index 68455a84c0..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkostemp64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c
deleted file mode 100644
index 4bc129bac1..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkstemp.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c
deleted file mode 100644
index 76a836372e..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkstemp64.c>
diff --git a/sysdeps/wordsize-64/mkostemp.c b/sysdeps/wordsize-64/mkostemp.c
deleted file mode 100644
index 4f81fdf544..0000000000
--- a/sysdeps/wordsize-64/mkostemp.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../misc/mkostemp.c"
-
-weak_alias (mkostemp, mkostemp64)
diff --git a/sysdeps/wordsize-64/mkostemp64.c b/sysdeps/wordsize-64/mkostemp64.c
deleted file mode 100644
index 14bb25023e..0000000000
--- a/sysdeps/wordsize-64/mkostemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in mkostemp.c. */
diff --git a/sysdeps/wordsize-64/mkstemp.c b/sysdeps/wordsize-64/mkstemp.c
deleted file mode 100644
index bf6df18485..0000000000
--- a/sysdeps/wordsize-64/mkstemp.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../misc/mkstemp.c"
-
-weak_alias (mkstemp, mkstemp64)
diff --git a/sysdeps/wordsize-64/mkstemp64.c b/sysdeps/wordsize-64/mkstemp64.c
deleted file mode 100644
index e72bb46433..0000000000
--- a/sysdeps/wordsize-64/mkstemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in mkstemp.c. */