[git commit nptl] regex_old: convert static flag variable to smallint
Denys Vlasenko
vda.linux at googlemail.com
Tue Apr 6 15:17:30 UTC 2010
commit: http://git.uclibc.org/uClibc/commit/?id=10f19b4565a82a9fb2ebb7bf938154afb4e09ad6
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
libc/misc/fnmatch/fnmatch.c | 8 +-------
libc/misc/regex/regex_old.c | 6 +++---
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index d25619b..0fa043b 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/libc/misc/fnmatch/fnmatch.c
@@ -21,13 +21,7 @@
# include <config.h>
#endif
-/* include unistd.h before we undefine _LIBC
- * because smallint is defined in unistd.h based
- * on _LIBC. For architectures that dont define
- * smallint of there own and rely upon the definition
- * from unistd.h will not build this file otherwise
- */
-
+/* unistd.h must be included with _LIBC defined: we need smallint */
#include <unistd.h>
#include <features.h>
#ifdef __UCLIBC__
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index bc2ad6c..a3c30b5 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -23,7 +23,8 @@
/* To exclude some unwanted junk.... */
#undef emacs
#include <features.h>
-
+/* unistd.h must be included with _LIBC defined: we need smallint */
+#include <unistd.h>
#ifdef __UCLIBC__
# undef _LIBC
# define _REGEX_RE_COMP
@@ -33,7 +34,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
-#include <unistd.h>
#include <stdio.h>
/* AIX requires this to be the first thing in the file. */
@@ -263,7 +263,7 @@ static void
init_syntax_once (void)
{
register int c;
- static int done = 0;
+ static smallint done = 0;
if (done)
return;
--
1.6.3.3
More information about the uClibc-cvs
mailing list