Print this page
code review feeback, close open comment
first round of POSIX 2008 stuff

*** 22,32 **** /* * Copyright (c) 1995, 1996, by Sun Microsystems, Inc. * All rights reserved. */ /* ! * Copyright 2013 Garrett D'Amore <garrett@damore.org> */ #ifndef _STRINGS_H #define _STRINGS_H --- 22,32 ---- /* * Copyright (c) 1995, 1996, by Sun Microsystems, Inc. * All rights reserved. */ /* ! * Copyright 2014 Garrett D'Amore <garrett@damore.org> */ #ifndef _STRINGS_H #define _STRINGS_H
*** 39,56 **** #ifdef __cplusplus extern "C" { #endif ! #if defined(__STDC__) ! extern int bcmp(const void *, const void *, size_t); extern void bcopy(const void *, void *, size_t); extern void bzero(void *, size_t); - extern char *index(const char *, int); extern char *rindex(const char *, int); /* * X/Open System Interfaces and Headers, Issue 4, Version 2, defines * both <string.h> and <strings.h>. The namespace requirements * do not permit the visibility of anything other than what is --- 39,56 ---- #ifdef __cplusplus extern "C" { #endif ! /* These symbols were replaced with mem* in XPG7 */ ! #if !defined(_STRICT_XPG7) extern int bcmp(const void *, const void *, size_t); extern void bcopy(const void *, void *, size_t); extern void bzero(void *, size_t); extern char *index(const char *, int); extern char *rindex(const char *, int); + #endif /* * X/Open System Interfaces and Headers, Issue 4, Version 2, defines * both <string.h> and <strings.h>. The namespace requirements * do not permit the visibility of anything other than what is
*** 72,102 **** extern int strcasecmp_l(const char *, const char *, locale_t); extern int strncasecmp_l(const char *, const char *, size_t, locale_t); #endif /* defined(_XPG7) */ #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */ - #else - - extern int bcmp(); - extern void bcopy(); - extern void bzero(); - - extern char *index(); - extern char *rindex(); - - #if defined(_XPG4_2) && !defined(__EXTENSIONS__) - extern int ffs(); - extern int strcasecmp(); - extern int strncasecmp(); - #if defined(_XPG7) - extern int strcasecmp_l(); - extern int strncasecmp_l(); - #endif - #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */ - - #endif /* __STDC__ */ - #ifdef __cplusplus } #endif #endif /* _STRINGS_H */ --- 72,81 ----