[sane-devel] [PATCH 3/4] cleanup, uniq PATH_SEP defines
Ruediger Meier
sweet_f_a at gmx.de
Sun Jan 15 14:47:48 UTC 2012
From: Ruediger Meier <ruediger.meier at ga-group.nl>
Always use the same portable PATH_SEP define (note _WIN32
is not defined on cygwin).
---
backend/dll.c | 6 +-----
backend/gt68xx.c | 2 +-
backend/microtek2.h | 2 +-
sanei/sanei_access.c | 2 +-
sanei/sanei_config.c | 8 +-------
5 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/backend/dll.c b/backend/dll.c
index 8e893e6..83d8550 100644
--- a/backend/dll.c
+++ b/backend/dll.c
@@ -108,11 +108,7 @@
# define PATH_MAX 1024
#endif
-#if defined(HAVE_OS2_H)
-# define DIR_SEP ";"
-#elif defined(__CYGWIN__)
-# define DIR_SEP ":"
-#elif defined(HAVE_WINDOWS_H)
+#if defined(_WIN32) || defined(HAVE_OS2_H)
# define DIR_SEP ";"
#else
# define DIR_SEP ":"
diff --git a/backend/gt68xx.c b/backend/gt68xx.c
index c3fdca0..efdb5e0 100644
--- a/backend/gt68xx.c
+++ b/backend/gt68xx.c
@@ -934,7 +934,7 @@ attach_one_device (SANE_String_Const devname)
return SANE_STATUS_GOOD;
}
-#if defined(HAVE_OS2_H)
+#if defined(_WIN32) || defined(HAVE_OS2_H)
# define PATH_SEP "\\"
#else
# define PATH_SEP "/"
diff --git a/backend/microtek2.h b/backend/microtek2.h
index faa856e..4100fad 100644
--- a/backend/microtek2.h
+++ b/backend/microtek2.h
@@ -64,7 +64,7 @@
#ifdef HAVE_AUTHORIZATION
#ifndef PATH_SEP
-#if defined(HAVE_OS2_H)
+#if defined(_WIN32) || defined(HAVE_OS2_H)
# define PATH_SEP "\\"
#else
# define PATH_SEP "/"
diff --git a/sanei/sanei_access.c b/sanei/sanei_access.c
index ca77d8c..b77cdd9 100644
--- a/sanei/sanei_access.c
+++ b/sanei/sanei_access.c
@@ -62,7 +62,7 @@
# define PATH_MAX 1024
#endif
-#if defined(HAVE_OS2_H) || defined(HAVE_WINDOWS_H)
+#if defined(_WIN32) || defined(HAVE_OS2_H)
# define PATH_SEP '\\'
#else
# define PATH_SEP '/'
diff --git a/sanei/sanei_config.c b/sanei/sanei_config.c
index 5fbc37f..c158766 100644
--- a/sanei/sanei_config.c
+++ b/sanei/sanei_config.c
@@ -59,13 +59,7 @@
# define PATH_MAX 1024
#endif
-#if defined(HAVE_OS2_H)
-# define DIR_SEP ";"
-# define PATH_SEP '\\'
-#elif defined(__CYGWIN__)
-# define DIR_SEP ":"
-# define PATH_SEP '/'
-#elif defined(HAVE_WINDOWS_H)
+#if defined(_WIN32) || defined(HAVE_OS2_H)
# define DIR_SEP ";"
# define PATH_SEP '\\'
#else
--
1.7.6.1
More information about the sane-devel
mailing list