]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - misc/mkstemp64.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / misc / mkstemp64.c
index 400bf47d068c33e33aec4d37a4ae8d64ffc928b6..cf839c54b0b275c906a1eb51290c8104ebb7b083 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2019 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
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
 #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.
    Then open the file and return a fd. */
 int
-mkstemp64 (template)
-     char *template;
+mkstemp64 (char *template)
 {
-  return __gen_tempname (template, O_LARGEFILE, __GT_FILE);
+  return __gen_tempname (template, 0, O_LARGEFILE, __GT_FILE);
 }
+
+#endif