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: 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 $
@ -5891,6 +5891,7 @@ description:
-DMKSH_ASSUME_UTF8=1 => not expected, please investigate
-UMKSH_ASSUME_UTF8 => not expected, but if your OS is old,
try passing HAVE_SETLOCALE_CTYPE=0 to Build.sh
need-pass: no
category: !os:hpux
need-ctty: yes
arguments: !-i!

View File

@ -38,7 +38,7 @@
#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
/*
@ -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? */
#if !defined(RLIM_INFINITY) && !defined(MKSH_NO_LIMITS)
#define MKSH_NO_LIMITS
#define MKSH_NO_LIMITS 1
#endif
#ifdef MKSH_NO_LIMITS
#define c_ulimit c_true
#define c_ulimit c_true
#endif
#if defined(ANDROID)

4
main.c
View File

@ -23,7 +23,7 @@
* of said person's immediate fault when using the work as intended.
*/
#define EXTERN
#define EXTERN
#include "sh.h"
#if HAVE_LANGINFO_CODESET
@ -33,7 +33,7 @@
#include <locale.h>
#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;

4
misc.c
View File

@ -29,7 +29,7 @@
#include <grp.h>
#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 */
unsigned char chtypes[UCHAR_MAX + 1];
@ -1915,7 +1915,6 @@ strstr(char *b, const char *l)
}
#endif
#ifndef MKSH_ASSUME_UTF8
#if !HAVE_STRCASESTR
const char *
stristr(const char *b, const char *l)
@ -1935,7 +1934,6 @@ stristr(const char *b, const char *l)
return (b - 1);
}
#endif
#endif
#ifdef MKSH_SMALL
char *

10
sh.h
View File

@ -151,7 +151,7 @@
#endif
#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
#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_CHILDREN
#define rusage mksh_rusage
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
struct rusage {
struct timeval ru_utime;
@ -476,7 +476,7 @@ char *ucstrstr(char *, const char *);
#endif
#if HAVE_STRCASESTR
#define stristr(b,l) ((const char *)strcasestr((b), (l)))
#define stristr(b,l) ((const char *)strcasestr((b), (l)))
#endif
#ifdef MKSH_SMALL
@ -496,7 +496,7 @@ char *ucstrstr(char *, const char *);
#endif
#if defined(MKSH_NOPROSPECTOFWORK) && !defined(MKSH_UNEMPLOYED)
#define MKSH_UNEMPLOYED
#define MKSH_UNEMPLOYED 1
#endif
/*