8sa1-gcc/libphobos/libdruntime/core/stdc/string.d
Iain Buclaw 92dd3e71f9 libphobos: Synchronize libdruntime bindings with upstream druntime
Reviewed-on: https://github.com/dlang/druntime/pull/3348

gcc/d/ChangeLog:

	* typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
	layout m_arg1 and m_arg2 fields.

libphobos/ChangeLog:

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* libdruntime/MERGE: Merge upstream druntime e4aae28e.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Refresh module list.
	(DRUNTIME_DSOURCES_BIONIC): Add core/sys/bionic/err.d.
	(DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/err.d,
	core/sys/darwin/ifaddrs.d, core/sys/darwin/mach/nlist.d,
	core/sys/darwin/mach/stab.d, and core/sys/darwin/sys/attr.d.
	(DRUNTIME_DSOURCES_DRAGONFLYBSD): Add core/sys/dragonflybsd/err.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/err.d.
	(DRUNTIME_DSOURCES_LINUX): Add core/sys/linux/err.d.
	(DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/err.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/err.d.
	(DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/locale.d,
	core/sys/posix/stdc/time.d, core/sys/posix/string.d, and
	core/sys/posix/strings.d.
	(DRUNTIME_DSOURCES_SOLARIS): Add core/sys/solaris/err.d.
	(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/sdkddkver.d,
	and core/sys/windows/stdc/time.d
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/sections/elf_shared.d (sizeofTLS): New function.
	* testsuite/libphobos.thread/fiber_guard_page.d: Use
	__traits(getMember) to get internal fields.
2021-01-30 16:50:57 +01:00

100 lines
2.7 KiB
D

/**
* D header file for C99.
*
* $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_string.h.html, _string.h)
*
* Copyright: Copyright Sean Kelly 2005 - 2009.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Sean Kelly
* Source: $(DRUNTIMESRC core/stdc/_string.d)
* Standards: ISO/IEC 9899:1999 (E)
*/
module core.stdc.string;
version (OSX)
version = Darwin;
else version (iOS)
version = Darwin;
else version (TVOS)
version = Darwin;
else version (WatchOS)
version = Darwin;
// Those libs don't expose the mandated C interface
version (CRuntime_Glibc)
version = ReturnStrerrorR;
else version (CRuntime_UClibc)
version = ReturnStrerrorR;
extern (C):
@system:
nothrow:
@nogc:
///
inout(void)* memchr(return inout void* s, int c, size_t n) pure;
///
int memcmp(scope const void* s1, scope const void* s2, size_t n) pure;
///
void* memcpy(return void* s1, scope const void* s2, size_t n) pure;
version (Windows)
{
///
int memicmp(scope const char* s1, scope const char* s2, size_t n);
}
///
void* memmove(return void* s1, scope const void* s2, size_t n) pure;
///
void* memset(return void* s, int c, size_t n) pure;
///
char* strcat(return char* s1, scope const char* s2) pure;
///
inout(char)* strchr(return inout(char)* s, int c) pure;
///
int strcmp(scope const char* s1, scope const char* s2) pure;
///
int strcoll(scope const char* s1, scope const char* s2);
///
char* strcpy(return char* s1, scope const char* s2) pure;
///
size_t strcspn(scope const char* s1, scope const char* s2) pure;
///
char* strdup(scope const char *s);
///
char* strerror(int errnum);
// This `strerror_r` definition is not following the POSIX standard
version (ReturnStrerrorR)
{
///
const(char)* strerror_r(int errnum, return char* buf, size_t buflen);
}
// This one is
else
{
int strerror_r(int errnum, scope char* buf, size_t buflen);
}
///
size_t strlen(scope const char* s) pure;
///
char* strncat(return char* s1, scope const char* s2, size_t n) pure;
///
int strncmp(scope const char* s1, scope const char* s2, size_t n) pure;
///
char* strncpy(return char* s1, scope const char* s2, size_t n) pure;
///
inout(char)* strpbrk(return inout(char)* s1, scope const char* s2) pure;
///
inout(char)* strrchr(return inout(char)* s, int c) pure;
///
size_t strspn(scope const char* s1, scope const char* s2) pure;
///
inout(char)* strstr(return inout(char)* s1, scope const char* s2) pure;
///
char* strtok(return char* s1, scope const char* s2);
///
size_t strxfrm(scope char* s1, scope const char* s2, size_t n);