From b8625cfc6f629f146aa3944b5cfc65025884bd44 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 1 Aug 2012 11:13:37 -0700 Subject: Clean up mkostemps64 definition for O_LARGEFILE==0. --- misc/mkostemps.c | 6 +++++- misc/mkostemps64.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'misc') diff --git a/misc/mkostemps.c b/misc/mkostemps.c index 64dd477..aca487d 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 17cbdaf..88d1460 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 #include +/* 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 -- cgit v1.1