diff options
author | Roland McGrath <roland@hack.frob.com> | 2012-08-01 11:13:37 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2012-08-01 11:13:37 -0700 |
commit | b8625cfc6f629f146aa3944b5cfc65025884bd44 (patch) | |
tree | 167e6a27e1af51cff4c84a08cd709068419ca21d | |
parent | 3f55550c148593f4a0db9eec939554bcf3f0bcd4 (diff) | |
download | glibc-b8625cfc6f629f146aa3944b5cfc65025884bd44.tar.gz glibc-b8625cfc6f629f146aa3944b5cfc65025884bd44.tar.xz glibc-b8625cfc6f629f146aa3944b5cfc65025884bd44.zip |
Clean up mkostemps64 definition for O_LARGEFILE==0.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | misc/mkostemps.c | 6 | ||||
-rw-r--r-- | misc/mkostemps64.c | 7 |
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 400a54e781..67d9b3920a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,9 +9,12 @@ Define mkstemps64 as an alias. * misc/mkostemp.c [!defined O_LARGEFILE || O_LARGEFILE == 0]: Define mkostemp64 as an alias. + * misc/mkostemps.c [!defined O_LARGEFILE || O_LARGEFILE == 0]: + Define mkostemps64 as an alias. * misc/mkstemp64.c [defined O_LARGEFILE && O_LARGEFILE != 0]: Conditionalize body on this. * misc/mkostemp64.c: Likewise. + * misc/mkostemps64.c: Likewise. * misc/mkstemps64.c: Likewise. * sysdeps/wordsize-64/mkstemp64.c: File removed. * sysdeps/wordsize-64/mkostemp64.c: File removed. diff --git a/misc/mkostemps.c b/misc/mkostemps.c index 64dd477fdf..aca487dca8 100644 --- a/misc/mkostemps.c +++ b/misc/mkostemps.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 @@ -41,3 +41,7 @@ mkostemps (template, suffixlen, flags) return __gen_tempname (template, suffixlen, flags, __GT_FILE); } + +#if !defined O_LARGEFILE || O_LARGEFILE == 0 +weak_alias (mkostemps, mkostemps64) +#endif diff --git a/misc/mkostemps64.c b/misc/mkostemps64.c index 17cbdaf1ad..88d1460f34 100644 --- a/misc/mkostemps64.c +++ b/misc/mkostemps64.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, mkostemps.c defines mkostemps64 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 @@ -38,3 +41,5 @@ mkostemps64 (template, suffixlen, flags) return __gen_tempname (template, suffixlen, flags | O_LARGEFILE, __GT_FILE); } + +#endif |