18376: Fix headers for wchar.h and some related gcc waringnings

This commit is contained in:
Peter Stephenson 2003-03-24 12:56:56 +00:00
parent 187ce46d15
commit d8e418bff1
4 changed files with 20 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2003-03-24 Peter Stephenson <pws@csr.com>
* 18376: zshconfig.ac, Src/system.h, Src/utils.c: use of
wide characters needs some more header munging; also silence
a couple of related gcc warnings.
2003-03-20 Doug Kearns <djkea2@mugca.its.monash.edu.au>
* 18369: Completion/Unix/Command/_tidy: update HTML Tidy completion

View file

@ -89,6 +89,16 @@ char *alloca _((size_t));
# include <unistd.h>
#endif
#ifdef HAVE_STDDEF_H
/*
* Seen on Solaris 8 with gcc: stddef defines offsetof, which clashes
* with system.h's definition of the symbol unless we include this
* first. Otherwise, this will be hooked in by wchar.h, too late
* for comfort.
*/
#include <stddef.h>
#endif
#include <stdio.h>
#include <ctype.h>
#include <sys/stat.h>

View file

@ -3395,8 +3395,8 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
for (i=(*s == 'u' ? 4 : 8); i>0; i--) {
if (*++s && idigit(*s))
wval = wval * 16 + (*s - '0');
else if (*s && (*s >= 'a' && *s <= 'f') ||
(*s >= 'A' && *s <= 'F'))
else if (*s && ((*s >= 'a' && *s <= 'f') ||
(*s >= 'A' && *s <= 'F')))
wval = wval * 16 + (*s & 0x1f) + 9;
else {
s--;
@ -3430,7 +3430,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
*len = t - buf;
return buf;
}
iconv(cd, &inptr, &inbytes, &outptr, &outbytes);
iconv(cd, (const char **)&inptr, &inbytes, &outptr, &outbytes);
iconv_close(cd);
count = wctomb(t, *outbuf);
#endif

View file

@ -494,7 +494,7 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
limits.h fcntl.h libc.h sys/utsname.h sys/resource.h \
locale.h errno.h stdio.h stdlib.h unistd.h sys/capability.h \
utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
netinet/in_systm.h pcre.h langinfo.h wchar.h)
netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h)
if test $dynamic = yes; then
AC_CHECK_HEADERS(dlfcn.h)
AC_CHECK_HEADERS(dl.h)