diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/rpc/create_xid.c | 2 | ||||
-rw-r--r-- | libc/misc/assert/__assert.c | 2 | ||||
-rw-r--r-- | libc/misc/fnmatch/fnmatch.c | 2 | ||||
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 3 | ||||
-rw-r--r-- | libc/misc/regex/regex_old.c | 2 | ||||
-rw-r--r-- | libc/misc/time/time.c | 6 | ||||
-rw-r--r-- | libc/stdlib/abort.c | 2 | ||||
-rw-r--r-- | libc/stdlib/getpt.c | 4 | ||||
-rw-r--r-- | libc/stdlib/malloc/heap_debug.c | 2 | ||||
-rw-r--r-- | libc/stdlib/malloc/malloc.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/bits/wordsize.h | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/nios/crtend.c | 2 | ||||
-rw-r--r-- | libc/termios/tcgetsid.c | 2 |
13 files changed, 23 insertions, 16 deletions
diff --git a/libc/inet/rpc/create_xid.c b/libc/inet/rpc/create_xid.c index 18b9c6e35..e3ee4799b 100644 --- a/libc/inet/rpc/create_xid.c +++ b/libc/inet/rpc/create_xid.c @@ -35,7 +35,7 @@ libc_hidden_proto(gettimeofday) __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER); -static int is_initialized; +static smallint is_initialized; static struct drand48_data __rpc_lrand48_data; u_long _create_xid (void) attribute_hidden; diff --git a/libc/misc/assert/__assert.c b/libc/misc/assert/__assert.c index bd3b3a91d..7a2fa1dce 100644 --- a/libc/misc/assert/__assert.c +++ b/libc/misc/assert/__assert.c @@ -44,7 +44,7 @@ libc_hidden_proto(__assert) #define ASSERT_SHOW_PROGNAME 1 -static int in_assert; /* bss inits to 0. */ +static smallint in_assert; /* bss inits to 0. */ void attribute_noreturn __assert(const char *assertion, const char * filename, int linenumber, register const char * function) diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c index 5e8578671..071626ff7 100644 --- a/libc/misc/fnmatch/fnmatch.c +++ b/libc/misc/fnmatch/fnmatch.c @@ -211,7 +211,7 @@ extern int errno; # endif /* Global variable. */ -static int posixly_correct; +static smallint posixly_correct; /* This function doesn't exist on most systems. */ diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 92aeead0e..60989298e 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -22,7 +22,6 @@ #include <link.h> #include <bits/uClibc_page.h> #include <paths.h> -#include <unistd.h> #include <asm/errno.h> #include <fcntl.h> #include <sys/stat.h> @@ -183,7 +182,7 @@ extern void __uClibc_init(void); libc_hidden_proto(__uClibc_init) void __uClibc_init(void) { - static int been_there_done_that = 0; + static smallint been_there_done_that; if (been_there_done_that) return; diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index 770392858..57b97ae68 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -798,7 +798,7 @@ PREFIX(extract_number_and_incr) (destination, source) /* It is useful to test things that ``must'' be true when debugging. */ # include <assert.h> -static int debug; +static smallint debug; # define DEBUG_STATEMENT(e) e # define DEBUG_PRINT1(x) if (debug) printf (x) diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 1fdd652bb..456bc25ab 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -1825,7 +1825,7 @@ static const char *getnumber(register const char *e, int *pn) #ifdef __UCLIBC_HAS_TZ_FILE__ #ifndef __UCLIBC_HAS_TZ_FILE_READ_MANY__ -static int TZ_file_read; /* Let BSS initialization set this to 0. */ +static smallint TZ_file_read; /* Let BSS initialization set this to 0. */ #endif /* __UCLIBC_HAS_TZ_FILE_READ_MANY__ */ static char *read_TZ_file(char *buf) @@ -1853,7 +1853,7 @@ static char *read_TZ_file(char *buf) p[-1] = 0; p = buf; #ifndef __UCLIBC_HAS_TZ_FILE_READ_MANY__ - ++TZ_file_read; + TZ_file_read = 1; #endif /* __UCLIBC_HAS_TZ_FILE_READ_MANY__ */ } else { ERROR: @@ -1901,7 +1901,7 @@ void _time_tzset(int use_old_rules) if (e != NULL) { TZ_file_read = 0; /* Reset if the TZ env var is set. */ - } else if (TZ_file_read > 0) { + } else if (TZ_file_read) { goto FAST_DONE; } #endif /* defined(__UCLIBC_HAS_TZ_FILE__) && !defined(__UCLIBC_HAS_TZ_FILE_READ_MANY__) */ diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c index 2146cc3db..e2c9962f2 100644 --- a/libc/stdlib/abort.c +++ b/libc/stdlib/abort.c @@ -46,7 +46,7 @@ libc_hidden_proto(_exit) #ifdef __UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__ extern void weak_function _stdio_term(void) attribute_hidden; #endif -static int been_there_done_that = 0; +static smallint been_there_done_that = 0; /* Be prepared in case multiple threads try to abort() */ #include <bits/uClibc_mutex.h> diff --git a/libc/stdlib/getpt.c b/libc/stdlib/getpt.c index cab96bb06..3dbaf9ed7 100644 --- a/libc/stdlib/getpt.c +++ b/libc/stdlib/getpt.c @@ -50,7 +50,7 @@ int getpt (void) { #if !defined __UNIX98PTY_ONLY__ - static int have_no_dev_ptmx; + static smallint have_no_dev_ptmx; #endif int fd; @@ -65,7 +65,7 @@ getpt (void) return fd; #else struct statfs fsbuf; - static int devpts_mounted; + static smallint devpts_mounted; /* Check that the /dev/pts filesystem is mounted or if /dev is a devfs filesystem (this implies /dev/pts). */ diff --git a/libc/stdlib/malloc/heap_debug.c b/libc/stdlib/malloc/heap_debug.c index e83831d3a..a2a9f4ec1 100644 --- a/libc/stdlib/malloc/heap_debug.c +++ b/libc/stdlib/malloc/heap_debug.c @@ -49,7 +49,7 @@ __heap_dump_freelist (struct heap *heap) void __heap_dump (struct heap *heap, const char *str) { - static int recursed = 0; + static smallint recursed; if (! recursed) { diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c index 770d7aea3..ce74c5608 100644 --- a/libc/stdlib/malloc/malloc.c +++ b/libc/stdlib/malloc/malloc.c @@ -184,7 +184,7 @@ malloc (size_t size) { void *mem; #ifdef MALLOC_DEBUGGING - static int debugging_initialized = 0; + static smallint debugging_initialized; if (! debugging_initialized) { debugging_initialized = 1; diff --git a/libc/sysdeps/linux/i386/bits/wordsize.h b/libc/sysdeps/linux/i386/bits/wordsize.h index ba643b60a..143fedadb 100644 --- a/libc/sysdeps/linux/i386/bits/wordsize.h +++ b/libc/sysdeps/linux/i386/bits/wordsize.h @@ -17,3 +17,11 @@ 02111-1307 USA. */ #define __WORDSIZE 32 + +#ifdef UCLIBC_INTERNAL +#ifndef smallint +typedef signed char smallint; +typedef unsigned char smalluint; +#define smallint smallint +#endif +#endif diff --git a/libc/sysdeps/linux/nios/crtend.c b/libc/sysdeps/linux/nios/crtend.c index 26af229af..bef6f513d 100644 --- a/libc/sysdeps/linux/nios/crtend.c +++ b/libc/sysdeps/linux/nios/crtend.c @@ -25,7 +25,7 @@ static void dummy_init(void) __attribute__((section(".trash"))); void dummy_init(void) { - static int initialized = 0; + static smallint initialized; static void (*volatile call__ctors)(void) = __do_global_ctors_aux; /* * Call global constructors. diff --git a/libc/termios/tcgetsid.c b/libc/termios/tcgetsid.c index ac7bd0992..8d3a40242 100644 --- a/libc/termios/tcgetsid.c +++ b/libc/termios/tcgetsid.c @@ -33,7 +33,7 @@ tcgetsid (int fd) pid_t pgrp; pid_t sid; #ifdef TIOCGSID - static int tiocgsid_does_not_work; + static smallint tiocgsid_does_not_work; if (! tiocgsid_does_not_work) { |