diff options
author | Eugene Sandulenko | 2009-02-15 09:35:14 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-02-15 09:35:14 +0000 |
commit | 958c72cfe541edcfc0e0b45b0092b23b821a78e0 (patch) | |
tree | 71749801c5194a0153ed097e7164849eca03dd7b | |
parent | 11b4bc25dc25fefdd413194c9c33108cc3d2c5c1 (diff) | |
download | scummvm-rg350-958c72cfe541edcfc0e0b45b0092b23b821a78e0.tar.gz scummvm-rg350-958c72cfe541edcfc0e0b45b0092b23b821a78e0.tar.bz2 scummvm-rg350-958c72cfe541edcfc0e0b45b0092b23b821a78e0.zip |
Portability fixes
svn-id: r38206
-rw-r--r-- | engines/sci/engine/kfile.c | 6 | ||||
-rw-r--r-- | engines/sci/include/engine.h | 3 | ||||
-rw-r--r-- | engines/sci/scicore/resource.c | 6 | ||||
-rw-r--r-- | engines/sci/scicore/resource_patch.c | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/engines/sci/engine/kfile.c b/engines/sci/engine/kfile.c index 90d0b86ed9..de260ca4d7 100644 --- a/engines/sci/engine/kfile.c +++ b/engines/sci/engine/kfile.c @@ -411,7 +411,7 @@ delete_savegame(state_t *s, int savedir_nr) reg_t kDeviceInfo_Win32(state_t *s, int funct_nr, int argc, reg_t *argv) { - char dir_buffer [MAX_PATH], dir_buffer2 [MAX_PATH]; + char dir_buffer [MAXPATHLEN], dir_buffer2 [MAX_PATHLEN]; int mode = UKPV(0); @@ -991,8 +991,8 @@ reg_t kValidPath(state_t *s, int funct_nr, int argc, reg_t *argv) { char *pathname = kernel_dereference_char_pointer(s, argv[0], 0); - char cpath[PATH_MAX + 1]; - getcwd(cpath, PATH_MAX + 1); + char cpath[MAXPATHLEN + 1]; + getcwd(cpath, MAXPATHLEN + 1); s->r_acc = make_reg(0, !chdir(pathname)); /* Try to go there. If it works, return 1, 0 otherwise. */ diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h index 871ffca3e9..746cc7230c 100644 --- a/engines/sci/include/engine.h +++ b/engines/sci/include/engine.h @@ -30,6 +30,9 @@ #include <config.h> #endif /* HAVE_CONFIG_H */ +// FIXME. Remove after transiton to File class +#include <sys/stat.h> + #include "sci/include/resource.h" #include "sci/include/sciresource.h" #include "sci/include/script.h" diff --git a/engines/sci/scicore/resource.c b/engines/sci/scicore/resource.c index e131b55606..026bd76834 100644 --- a/engines/sci/scicore/resource.c +++ b/engines/sci/scicore/resource.c @@ -259,7 +259,7 @@ _scir_load_from_patch_file(int fh, resource_t *res, char *filename) static void _scir_load_resource(resource_mgr_t *mgr, resource_t *res, int protect) { - char filename[PATH_MAX]; + char filename[MAXPATHLEN]; int fh; resource_t backup; char *save_cwd = sci_getcwd(); @@ -356,7 +356,7 @@ int sci_test_view_type(resource_mgr_t *mgr) { int fh; - char filename[PATH_MAX]; + char filename[MAXPATHLEN]; int compression; resource_t *res; int i; @@ -445,7 +445,7 @@ scir_add_appropriate_sources(resource_mgr_t *mgr, char *name; resource_source_t *map; int fd; - char fullname[PATH_MAX]; + char fullname[MAXPATHLEN]; if (dir[strlen(dir)-1] != G_DIR_SEPARATOR) { diff --git a/engines/sci/scicore/resource_patch.c b/engines/sci/scicore/resource_patch.c index 1cdaeb503d..b17058c09b 100644 --- a/engines/sci/scicore/resource_patch.c +++ b/engines/sci/scicore/resource_patch.c @@ -48,7 +48,7 @@ process_patch(resource_source_t *source, char *entry, int restype, int resnumber, resource_t **resource_p, int *resource_nr_p) { int fsize; - char filename[PATH_MAX]; + char filename[MAXPATHLEN]; if (restype == sci_invalid_resource) return; |