mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-26 19:36:28 +00:00
[lldb] Remove some unused functions from PosixApi.h
There are better llvm replacements for all of these.
This commit is contained in:
parent
614363ecc0
commit
3631b9014d
@ -84,12 +84,6 @@ typedef uint32_t pid_t;
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
#define S_IFDIR _S_IFDIR
|
||||
|
||||
#ifndef S_ISDIR
|
||||
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
// Various useful posix functions that are not present in Windows. We provide
|
||||
@ -99,9 +93,6 @@ char *strcasestr(const char *s, const char *find);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
char *basename(char *path);
|
||||
char *dirname(char *path);
|
||||
|
||||
int strcasecmp(const char *s1, const char *s2);
|
||||
int strncasecmp(const char *s1, const char *s2, size_t n);
|
||||
|
||||
@ -110,10 +101,6 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
|
||||
// empty functions
|
||||
inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; }
|
||||
|
||||
inline int strerror_r(int errnum, char *buf, size_t buflen) {
|
||||
LLVM_BUILTIN_UNREACHABLE;
|
||||
}
|
||||
|
||||
inline int unlockpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
|
||||
inline int grantpt(int fd) { LLVM_BUILTIN_UNREACHABLE; }
|
||||
inline char *ptsname(int fd) { LLVM_BUILTIN_UNREACHABLE; }
|
||||
|
@ -64,27 +64,6 @@ char *strcasestr(const char *s, const char *find) {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
char *basename(char *path) {
|
||||
char *l1 = strrchr(path, '\\');
|
||||
char *l2 = strrchr(path, '/');
|
||||
if (l2 > l1)
|
||||
l1 = l2;
|
||||
if (!l1)
|
||||
return path; // no base name
|
||||
return &l1[1];
|
||||
}
|
||||
|
||||
char *dirname(char *path) {
|
||||
char *l1 = strrchr(path, '\\');
|
||||
char *l2 = strrchr(path, '/');
|
||||
if (l2 > l1)
|
||||
l1 = l2;
|
||||
if (!l1)
|
||||
return NULL; // no dir name
|
||||
*l1 = 0;
|
||||
return path;
|
||||
}
|
||||
|
||||
int strcasecmp(const char *s1, const char *s2) { return stricmp(s1, s2); }
|
||||
|
||||
int strncasecmp(const char *s1, const char *s2, size_t n) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user