mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-01-23 08:18:41 +00:00
fix compilation bugs
This commit is contained in:
parent
593fbc9f89
commit
2322ffdc85
|
|
@ -17,11 +17,11 @@
|
|||
#include <direct.h>
|
||||
#include <io.h>
|
||||
|
||||
typedef _chdir chdir;
|
||||
typedef _getcwd getcwd;
|
||||
#define _chdir chdir;
|
||||
#define _getcwd getcwd;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef _access_s access;
|
||||
#define _access_s access;
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Utils
|
|||
size_t c = 0;
|
||||
while (*haystack && c < i + match * (newLength - oldLength)) {
|
||||
if (strstr(haystack, needle) == haystack) {
|
||||
strcpy(&result[c], replace);
|
||||
strcpy(&result[c], (char *) replace);
|
||||
|
||||
c += newLength;
|
||||
haystack += oldLength;
|
||||
|
|
@ -125,7 +125,7 @@ namespace Utils
|
|||
char *token;
|
||||
int i = 0;
|
||||
|
||||
while ((token = strsep(&str, &delim)) != NULL) {
|
||||
while ((token = strsep(&str, (char *) & delim)) != NULL) {
|
||||
list[i] = (char *) malloc(strlen(token + 1) * sizeof(char));
|
||||
memcpy(list[i], token, (strlen(token) + 1) * sizeof(char));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user