1
1

Use Windows functions ... Microsoft complain about a bunch of POSIX functions as being

deprecated. They offer the _ version as not deprecated, so let's use what they provide.

This commit was SVN r8470.
Этот коммит содержится в:
George Bosilca 2005-12-12 22:04:30 +00:00
родитель c107d02eee
Коммит 6f3ac068a6
2 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -46,7 +46,7 @@ static __inline unsigned int sleep(unsigned int seconds) {
}
/* this function can currently ONLY return the page size. for it to
do the entire sysconf range it needs to beb extended */
do the entire sysconf range it needs to be extended */
static __inline size_t sysconf(int option) {
SYSTEM_INFO sys_info;
@ -55,11 +55,10 @@ static __inline size_t sysconf(int option) {
if (_SC_PAGESIZE == option){
return (size_t)sys_info.dwPageSize;
}
else {
printf("This functionality is not supported: line: %d\tfile: %s\n",
__LINE__, __FILE__);
abort();
}
printf( "This functionality is not supported: line: %d\tfile: %s\n",
__LINE__, __FILE__);
abort();
return 0;
}
#define F_GETFL 0

Просмотреть файл

@ -39,7 +39,7 @@ static __inline char *basename(char *path) {
while (*p != '\0') p++;
while (*p != '\\') p--;
ret = strdup(++p);
ret = _strdup(++p);
return ret;
}
@ -53,7 +53,7 @@ static __inline char *dirname(char *path) {
char *base;
base = basename(path);
dirname = strdup(path);
dirname = _strdup(path);
strncpy(dirname, path, strlen(path)-strlen(base));
dirname[strlen(path)-strlen(base)] = '\0';