Skip to content

Commit d955d17

Browse files
misccorwgk
authored andcommitted
Do not include our own string.h file (NVIDIA#2444)
That might conflict with the host standard library
1 parent 31c3eb9 commit d955d17

File tree

2 files changed

+3
-197
lines changed

2 files changed

+3
-197
lines changed

libcudacxx/include/cuda/std/detail/libcxx/include/cstring

+3-51
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,6 @@
1010
#ifndef _LIBCUDACXX_CSTRING
1111
#define _LIBCUDACXX_CSTRING
1212

13-
/*
14-
cstring synopsis
15-
16-
Macros:
17-
18-
NULL
19-
20-
namespace std
21-
{
22-
23-
Types:
24-
25-
size_t
26-
27-
void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
28-
void* memmove(void* s1, const void* s2, size_t n);
29-
char* strcpy (char* restrict s1, const char* restrict s2);
30-
char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
31-
char* strcat (char* restrict s1, const char* restrict s2);
32-
char* strncat(char* restrict s1, const char* restrict s2, size_t n);
33-
int memcmp(const void* s1, const void* s2, size_t n);
34-
int strcmp (const char* s1, const char* s2);
35-
int strncmp(const char* s1, const char* s2, size_t n);
36-
int strcoll(const char* s1, const char* s2);
37-
size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
38-
const void* memchr(const void* s, int c, size_t n);
39-
void* memchr( void* s, int c, size_t n);
40-
const char* strchr(const char* s, int c);
41-
char* strchr( char* s, int c);
42-
size_t strcspn(const char* s1, const char* s2);
43-
const char* strpbrk(const char* s1, const char* s2);
44-
char* strpbrk( char* s1, const char* s2);
45-
const char* strrchr(const char* s, int c);
46-
char* strrchr( char* s, int c);
47-
size_t strspn(const char* s1, const char* s2);
48-
const char* strstr(const char* s1, const char* s2);
49-
char* strstr( char* s1, const char* s2);
50-
char* strtok(char* restrict s1, const char* restrict s2);
51-
void* memset(void* s, int c, size_t n);
52-
char* strerror(int errnum);
53-
size_t strlen(const char* s);
54-
55-
} // std
56-
57-
*/
58-
5913
#include <cuda/std/detail/__config>
6014

6115
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
@@ -66,11 +20,9 @@ size_t strlen(const char* s);
6620
# pragma system_header
6721
#endif // no system header
6822

69-
#if defined(_CCCL_COMPILER_MSVC)
23+
#if !defined(_CCCL_COMPILER_NVRTC)
7024
# include <cstring>
71-
#else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv
72-
# include <cuda/std/detail/libcxx/include/string.h>
73-
#endif // !_CCCL_COMPILER_MSVC
25+
#endif // !_CCCL_COMPILER_NVRTC
7426

7527
_LIBCUDACXX_BEGIN_NAMESPACE_STD
7628

@@ -98,7 +50,7 @@ using ::strstr;
9850
using ::strxfrm;
9951
# ifndef _LIBCUDACXX_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
10052
using ::strtok;
101-
# endif
53+
# endif // _LIBCUDACXX_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
10254
using ::strerror;
10355
using ::strlen;
10456
#endif // _CCCL_COMPILER_NVRTC

libcudacxx/include/cuda/std/detail/libcxx/include/string.h

-146
This file was deleted.

0 commit comments

Comments
 (0)