From a28bd84350f250f50b51c6a095347e3be4771eac Mon Sep 17 00:00:00 2001 From: Oliver Rauch Date: Sun, 16 May 2004 22:08:03 +0000 Subject: [PATCH] Added DIR_SEP and PATH_SEP defintions for windows --- ChangeLog | 8 ++++++++ backend/dll.c | 13 +++++++++++-- sanei/sanei_config.c | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79901b56c..f3e6246c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-05-16 Oliver Rauch + + * sanei/sanei_config.c: added DIR_SEP=";" and PATH_SEP="\\" + for windows (when windows.h) is available + + * backend/dll.c: added DIR_SEP definitions from sanei_config.c + and replaced relevant ":" by DIR_SEP + 2004-05-15 Gerhard Jaeger * doc/plustek/BUID: bumped up build number. diff --git a/backend/dll.c b/backend/dll.c index 570ddfaee..61b01c85e 100644 --- a/backend/dll.c +++ b/backend/dll.c @@ -99,6 +99,15 @@ # define PATH_MAX 1024 #endif +#if defined(HAVE_OS2_H) +# define DIR_SEP ";" +#elif defined(HAVE_WINDOWS_H) +# define DIR_SEP ";" +#else +# define DIR_SEP ":" +#endif + + #include "sane/sanei_config.h" #define DLL_CONFIG_FILE "dll.conf" #define DLL_ALIASES_FILE "dll.aliases" @@ -365,7 +374,7 @@ load (struct backend *be) } DBG (3, "load: searching backend `%s' in `%s'\n", be->name, src); - dir = strsep (&src, ":"); + dir = strsep (&src, DIR_SEP); while (dir) { @@ -377,7 +386,7 @@ load (struct backend *be) break; DBG (4, "load: couldn't open `%s' (%s)\n", libname, strerror (errno)); - dir = strsep (&src, ":"); + dir = strsep (&src, DIR_SEP); } if (orig_src) free (orig_src); diff --git a/sanei/sanei_config.c b/sanei/sanei_config.c index a37654ab1..1589d2a4f 100644 --- a/sanei/sanei_config.c +++ b/sanei/sanei_config.c @@ -62,6 +62,9 @@ #if defined(HAVE_OS2_H) # define DIR_SEP ";" # define PATH_SEP '\\' +#elif defined(HAVE_WINDOWS_H) +# define DIR_SEP ";" +# define PATH_SEP '\\' #else # define DIR_SEP ":" # define PATH_SEP '/'