Changed code so that it will be compatible with c++.
1. Added #ifdef extern "C" to public header files. 2. Changed variables that are key words in c++, to different names (like ns instead of namespace). 3. Changed char* to const char* for constant strings.
This commit is contained in:
parent
eda4a58ebf
commit
58ea4eba27
27 changed files with 274 additions and 119 deletions
|
|
@ -78,7 +78,7 @@ static inline char * strdup4(char *str)
|
|||
char *dup;
|
||||
int len;
|
||||
len = align4(strlen(str)+1);
|
||||
if ((dup = malloc(len)) == NULL)
|
||||
if ((dup = (char*) malloc(len)) == NULL)
|
||||
return NULL;
|
||||
strncpy(dup, str, len);
|
||||
return dup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue