diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-27 14:11:07 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-27 14:11:07 +0400 |
commit | fd134927dd23047237c6e490c09454487ba19a4a (patch) | |
tree | bd0d63f66af304da5d8b62aca4c5f6a0c0cfe2d4 /source/blender/blenlib | |
parent | 0c8cde2bb6bf5f38b4f567342ca371ec164f211c (diff) | |
parent | a0e62e77d75f0732ef877401f4ed9b1861ff9126 (diff) |
Merging r42800 through r42895 from trunk into soc-2011-tomato
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index e79d850caa5..9adb39f09ef 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -317,7 +317,7 @@ void BLI_uniquename(ListBase *list, void *vlink, const char defname[], char deli void BLI_cleanup_path(const char *relabase, char *dir) { - short a; + ptrdiff_t a; char *start, *eind; if (relabase) { BLI_path_abs(dir, relabase); @@ -1416,7 +1416,7 @@ int BLI_replace_extension(char *path, size_t maxlen, const char *ext) { size_t path_len= strlen(path); size_t ext_len= strlen(ext); - size_t a; + ssize_t a; for(a= path_len - 1; a >= 0; a--) { if (ELEM3(path[a], '.', '/', '\\')) { @@ -1424,7 +1424,7 @@ int BLI_replace_extension(char *path, size_t maxlen, const char *ext) } } - if (path[a] != '.') { + if ((a < 0) || (path[a] != '.')) { a= path_len; } @@ -1440,7 +1440,7 @@ int BLI_ensure_extension(char *path, size_t maxlen, const char *ext) { size_t path_len= strlen(path); size_t ext_len= strlen(ext); - size_t a; + ssize_t a; /* first check the extension is alread there */ if ( (ext_len <= path_len) && diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 001b191155d..c5b6f46b3bc 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -54,7 +54,7 @@ #include <sys/mount.h> #endif -#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) +#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) || defined(__GNU__) || defined(__GLIBC__) #include <sys/vfs.h> #endif @@ -180,7 +180,7 @@ double BLI_dir_free_space(const char *dir) if (slash) slash[1] = 0; } else strcpy(name,"/"); -#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) +#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) || defined(__GNU__) || defined(__GLIBC__) if (statfs(name, &disk)) return(-1); #endif |