summaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-09-09 14:48:36 +0000
committerRichard Levitte <levitte@openssl.org>2003-09-09 14:48:36 +0000
commite6fa67fa9337d498b4383b067da04c6b6e802cd0 (patch)
tree238c265927f1f143be8d0b62d80eaba98d1f8c5c /e_os.h
parent9ea72d3705697b3d83023326f2d453530e5b4802 (diff)
Generalise the definition of strcasecmp() and strncasecmp() for
platforms that don't (necessarely) have it. In the case of VMS, this means moving a couple of functions from apps/ to crypto/ and make them general (although only used privately).
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/e_os.h b/e_os.h
index 3800bfd75f..3f7cdf4b51 100644
--- a/e_os.h
+++ b/e_os.h
@@ -503,11 +503,30 @@ extern char *sys_errlist[]; extern int sys_nerr;
#define IRIX_CC_BUG /* CDS++ up to V2.0Bsomething suffered from the same bug.*/
#endif
+#if defined(OPENSSL_SYS_WINDOWS)
+# define strcasecmp _stricmp
+# define strncasecmp _strnicmp
+#elif defined(OPENSSL_SYS_VMS)
+/* VMS below version 7.0 doesn't have strcasecmp() */
+# include <openssl/o_str.h>
+# define strcasecmp OPENSSL_strcasecmp
+# define strncasecmp OPENSSL_strncasecmp
+#elif defined(OPENSSL_SYS_OS2) && defined(__EMX__)
+# define strcasecmp stricmp
+# define strncasecmp strnicmp
+#else
+# ifdef NO_STRINGS_H
+ int strcasecmp();
+ int strncasecmp();
+# else
+# include <strings.h>
+# endif /* NO_STRINGS_H */
+#endif
+
#if defined(OPENSSL_SYS_OS2) && defined(__EMX__)
# include <io.h>
# include <fcntl.h>
# define NO_SYSLOG
-# define strcasecmp stricmp
#endif
/* vxworks */