experimental support for <strings.h>

cf. http://www.opengroup.org/onlinepubs/009695399/basedefs/strings.h.html
QNX seems to bury some functions in there
This commit is contained in:
tg 2008-11-02 22:29:36 +00:00
parent e561d9adfe
commit 89e96b6c86
3 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.365 2008/10/30 17:11:14 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.366 2008/11/02 22:29:34 tg Exp $'
#-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -864,6 +864,7 @@ ac_header libgen.h
ac_header libutil.h sys/types.h
ac_header paths.h
ac_header stdbool.h
ac_header strings.h
ac_header grp.h sys/types.h
ac_header ulimit.h sys/types.h
ac_header values.h
@ -1118,6 +1119,9 @@ EOF
ac_test strcasestr <<-'EOF'
#include <stddef.h>
#include <string.h>
#if HAVE_STRINGS_H
#include <strings.h>
#endif
int main(int ac, char *av[]) {
return ((ptrdiff_t)(void *)strcasestr(*av, av[ac]));
}

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.237 2008/10/28 14:32:37 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.238 2008/11/02 22:29:35 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 $
@ -7,7 +7,7 @@
# http://www.research.att.com/~gsf/public/ifs.sh
expected-stdout:
@(#)MIRBSD KSH R36 2008/10/28
@(#)MIRBSD KSH R36 2008/11/02
description:
Check version of shell.
stdin:

7
sh.h
View File

@ -58,6 +58,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_STRINGS_H
#include <strings.h>
#endif
#include <termios.h>
#include <time.h>
#if HAVE_ULIMIT_H
@ -100,9 +103,9 @@
#define __SCCSID(x) __IDSTRING(sccsid,x)
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.249 2008/10/28 14:51:06 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.250 2008/11/02 22:29:36 tg Exp $");
#endif
#define MKSH_VERSION "R36 2008/10/28"
#define MKSH_VERSION "R36 2008/11/02"
#ifndef MKSH_INCLUDES_ONLY