jg71 reported -DMKSH_ASSUME_UTF8=* breaks defining stristr

This commit is contained in:
tg
2011-08-27 17:30:07 +00:00
parent da80c56acb
commit 5d9c88ceeb
5 changed files with 13 additions and 14 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.479 2011/07/26 16:57:25 tg Exp $ # $MirOS: src/bin/mksh/check.t,v 1.480 2011/08/27 17:30:02 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -5891,6 +5891,7 @@ description:
-DMKSH_ASSUME_UTF8=1 => not expected, please investigate -DMKSH_ASSUME_UTF8=1 => not expected, please investigate
-UMKSH_ASSUME_UTF8 => not expected, but if your OS is old, -UMKSH_ASSUME_UTF8 => not expected, but if your OS is old,
try passing HAVE_SETLOCALE_CTYPE=0 to Build.sh try passing HAVE_SETLOCALE_CTYPE=0 to Build.sh
need-pass: no
category: !os:hpux category: !os:hpux
need-ctty: yes need-ctty: yes
arguments: !-i! arguments: !-i!

View File

@ -38,7 +38,7 @@
#endif #endif
#endif #endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.194 2011/07/20 23:47:28 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.195 2011/08/27 17:30:04 tg Exp $");
#if HAVE_KILLPG #if HAVE_KILLPG
/* /*
@ -53,11 +53,11 @@ __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.194 2011/07/20 23:47:28 tg Exp $");
/* XXX conditions correct? */ /* XXX conditions correct? */
#if !defined(RLIM_INFINITY) && !defined(MKSH_NO_LIMITS) #if !defined(RLIM_INFINITY) && !defined(MKSH_NO_LIMITS)
#define MKSH_NO_LIMITS #define MKSH_NO_LIMITS 1
#endif #endif
#ifdef MKSH_NO_LIMITS #ifdef MKSH_NO_LIMITS
#define c_ulimit c_true #define c_ulimit c_true
#endif #endif
#if defined(ANDROID) #if defined(ANDROID)

4
main.c
View File

@ -23,7 +23,7 @@
* of said person's immediate fault when using the work as intended. * of said person's immediate fault when using the work as intended.
*/ */
#define EXTERN #define EXTERN
#include "sh.h" #include "sh.h"
#if HAVE_LANGINFO_CODESET #if HAVE_LANGINFO_CODESET
@ -33,7 +33,7 @@
#include <locale.h> #include <locale.h>
#endif #endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.196 2011/07/16 17:08:19 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/main.c,v 1.197 2011/08/27 17:30:06 tg Exp $");
extern char **environ; extern char **environ;

4
misc.c
View File

@ -29,7 +29,7 @@
#include <grp.h> #include <grp.h>
#endif #endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.169 2011/07/06 22:21:57 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/misc.c,v 1.170 2011/08/27 17:30:07 tg Exp $");
/* type bits for unsigned char */ /* type bits for unsigned char */
unsigned char chtypes[UCHAR_MAX + 1]; unsigned char chtypes[UCHAR_MAX + 1];
@ -1915,7 +1915,6 @@ strstr(char *b, const char *l)
} }
#endif #endif
#ifndef MKSH_ASSUME_UTF8
#if !HAVE_STRCASESTR #if !HAVE_STRCASESTR
const char * const char *
stristr(const char *b, const char *l) stristr(const char *b, const char *l)
@ -1935,7 +1934,6 @@ stristr(const char *b, const char *l)
return (b - 1); return (b - 1);
} }
#endif #endif
#endif
#ifdef MKSH_SMALL #ifdef MKSH_SMALL
char * char *

10
sh.h
View File

@ -151,7 +151,7 @@
#endif #endif
#ifdef EXTERN #ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.491 2011/08/13 22:19:41 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/sh.h,v 1.492 2011/08/27 17:30:07 tg Exp $");
#endif #endif
#define MKSH_VERSION "R40 2011/07/26" #define MKSH_VERSION "R40 2011/07/26"
@ -164,8 +164,8 @@ __RCSID("$MirOS: src/bin/mksh/sh.h,v 1.491 2011/08/13 22:19:41 tg Exp $");
#undef RUSAGE_SELF #undef RUSAGE_SELF
#undef RUSAGE_CHILDREN #undef RUSAGE_CHILDREN
#define rusage mksh_rusage #define rusage mksh_rusage
#define RUSAGE_SELF 0 #define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1 #define RUSAGE_CHILDREN -1
struct rusage { struct rusage {
struct timeval ru_utime; struct timeval ru_utime;
@ -476,7 +476,7 @@ char *ucstrstr(char *, const char *);
#endif #endif
#if HAVE_STRCASESTR #if HAVE_STRCASESTR
#define stristr(b,l) ((const char *)strcasestr((b), (l))) #define stristr(b,l) ((const char *)strcasestr((b), (l)))
#endif #endif
#ifdef MKSH_SMALL #ifdef MKSH_SMALL
@ -496,7 +496,7 @@ char *ucstrstr(char *, const char *);
#endif #endif
#if defined(MKSH_NOPROSPECTOFWORK) && !defined(MKSH_UNEMPLOYED) #if defined(MKSH_NOPROSPECTOFWORK) && !defined(MKSH_UNEMPLOYED)
#define MKSH_UNEMPLOYED #define MKSH_UNEMPLOYED 1
#endif #endif
/* /*