]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/SDKs/darwin/usr/include/string.h
1 /* ===-- string.h - stub SDK header for compiler-rt -------------------------===
3 * The LLVM Compiler Infrastructure
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
8 * ===-----------------------------------------------------------------------===
10 * This is a stub SDK header file. This file is not part of the interface of
11 * this library nor an official version of the appropriate SDK header. It is
12 * intended only to stub the features of this header required by compiler-rt.
14 * ===-----------------------------------------------------------------------===
20 typedef __SIZE_TYPE__
size_t;
22 int memcmp(const void *, const void *, size_t);
23 void *memcpy(void *, const void *, size_t);
24 void *memset(void *, int, size_t);
25 char *strcat(char *, const char *);
26 char *strcpy(char *, const char *);
27 char *strdup(const char *);
28 size_t strlen(const char *);
29 char *strncpy(char *, const char *, size_t);
31 /* Determine the appropriate strerror() function. */
32 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
34 # define __STRERROR_NAME "_strerror$UNIX2003"
35 # elif defined(__x86_64__) || defined(__arm)
36 # define __STRERROR_NAME "_strerror"
38 # error "unrecognized architecture for targetting OS X"
40 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
41 # if defined(__i386) || defined (__x86_64) || defined(__arm)
42 # define __STRERROR_NAME "_strerror"
44 # error "unrecognized architecture for targetting iOS"
47 # error "unrecognized architecture for targetting Darwin"
50 char *strerror(int) __asm(__STRERROR_NAME
);
52 #endif /* __STRING_H__ */