4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-17 03:49:46 +08:00
Yaakov Selkowitz 9f90ae0435 Feature test macros overhaul: string.h and strings.h overlaps
strings.h is the header mandated for these functions in POSIX.1 prior to
2008 (when most of these were removed).  The declarations in string.h are
only for BSD compatibility.  But when both headers are included, avoid
duplicate declarations.

Also, mark stpcpy and stpncpy as POSIX.1-2008.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-04-13 23:50:11 -05:00

41 lines
1.1 KiB
C

/*
* strings.h
*
* Definitions for string operations.
*/
#ifndef _STRINGS_H_
#define _STRINGS_H_
/* These functions are already declared in <string.h> with __BSD_VISIBLE */
#if !(defined(_STRING_H_) && __BSD_VISIBLE)
#include "_ansi.h"
#include <sys/reent.h>
#include <sys/cdefs.h>
#include <sys/types.h> /* for size_t */
_BEGIN_STD_C
#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE < 200809)
/*
* Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004
* Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008
*/
int _EXFUN(bcmp,(const void *, const void *, size_t));
void _EXFUN(bcopy,(const void *, void *, size_t));
void _EXFUN(bzero,(void *, size_t));
char *_EXFUN(index,(const char *, int));
char *_EXFUN(rindex,(const char *, int));
#endif /* __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE < 200809) */
int _EXFUN(ffs,(int));
int _EXFUN(strcasecmp,(const char *, const char *));
int _EXFUN(strncasecmp,(const char *, const char *, size_t));
_END_STD_C
#endif /* !(_STRING_H_ && __BSD_VISIBLE) */
#endif /* _STRINGS_H_ */