diff options
author | Eric Blake <eblake@redhat.com> | 2007-05-16 19:31:08 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2007-05-16 19:31:08 +0000 |
commit | f65607751cf60bb615ee0437a0d0984af47b0fb3 (patch) | |
tree | 2f3ceffee93dda94d4f1c1d85c0b90c61c7ad794 /newlib | |
parent | 2ba0944446523f33f8f0f91b334eddd7f627e08e (diff) | |
download | newlib-f65607751cf60bb615ee0437a0d0984af47b0fb3.zip newlib-f65607751cf60bb615ee0437a0d0984af47b0fb3.tar.gz newlib-f65607751cf60bb615ee0437a0d0984af47b0fb3.tar.bz2 |
* libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin.
* libc/search/hash.c (__hash_open): Likewise.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/search/hash.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdlib/wctomb_r.c | 8 |
3 files changed, 15 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index d41cba3..6e56ebe 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2007-05-16 Eric Blake <ebb9@byu.net> + + * libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin. + * libc/search/hash.c (__hash_open): Likewise. + 2007-05-14 Eric Blake <ebb9@byu.net> Reduce stack size of *printf. diff --git a/newlib/libc/search/hash.c b/newlib/libc/search/hash.c index 348cbaa..8f56b6b 100644 --- a/newlib/libc/search/hash.c +++ b/newlib/libc/search/hash.c @@ -110,7 +110,11 @@ __hash_open(file, flags, mode, info, dflags) { HTAB *hashp; +#ifdef __USE_INTERNAL_STAT64 + struct stat64 statbuf; +#else struct stat statbuf; +#endif DB *dbp; int bpages, hdrsize, new_table, nsegs, save_errno; diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c index a018632..8273042 100644 --- a/newlib/libc/stdlib/wctomb_r.c +++ b/newlib/libc/stdlib/wctomb_r.c @@ -13,9 +13,14 @@ int _DEFUN (_wctomb_r, (r, s, wchar, state), struct _reent *r _AND char *s _AND - wchar_t wchar _AND + wchar_t _wchar _AND mbstate_t *state) { + /* Avoids compiler warnings about comparisons that are always false + due to limited range when sizeof(wchar_t) is 2 but sizeof(wint_t) + is 4, as is the case on cygwin. */ + wint_t wchar = _wchar; + if (strlen (__lc_ctype) <= 1) { /* fall-through */ } else if (!strcmp (__lc_ctype, "C-UTF-8")) @@ -171,4 +176,3 @@ _DEFUN (_wctomb_r, (r, s, wchar, state), return 1; } - |