X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fsh%2Fsnprintf.c;h=c406d4ad590631c89aaca0ced4f63e39468401ff;hb=3185942a5234e26ab13fa02f9c51d340cec514f8;hp=246a01aee5cc59194ec656dc14c643f785ae5019;hpb=f1be666c7d78939ad775078d290bec2758fa29a2;p=platform%2Fupstream%2Fbash.git
diff --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c
index 246a01a..c406d4a 100644
--- a/lib/sh/snprintf.c
+++ b/lib/sh/snprintf.c
@@ -1,3 +1,5 @@
+/* snprintf - formatted output to strings, with bounds checking and allocation */
+
/*
build a test version with
gcc -g -DDRIVER -I../.. -I../../include -o test-snprintf snprintf.c fmtu*long.o
@@ -7,21 +9,22 @@
Unix snprintf implementation.
derived from inetutils/libinetutils/snprintf.c Version 1.1
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001,2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General License as published by
- the Free Software Foundation; either version 2 of the License, or
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
+
+ Bash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General License for more details.
-
- You should have received a copy of the GNU General License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see .
Revision History:
@@ -58,6 +61,11 @@
# include
#endif
+#if defined(DEBUG)
+# undef HAVE_SNPRINTF
+# undef HAVE_ASPRINTF
+#endif
+
#if defined(DRIVER) && !defined(HAVE_CONFIG_H)
#define HAVE_LONG_LONG
#define HAVE_LONG_DOUBLE
@@ -401,7 +409,7 @@ static void xfree __P((void *));
} \
} while (0)
-#if defined (HAVE_LOCALE_H)
+#if defined (HAVE_LOCALE_H) && defined (HAVE_LOCALECONV)
# define GETLOCALEDATA(d, t, g) \
do \
{ \