Set default option to exclude pj_stricmp_alnum()

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@354 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/build/os-linux.mak b/pjlib/build/os-linux.mak
index 568d1a1..7a30fa7 100644
--- a/pjlib/build/os-linux.mak
+++ b/pjlib/build/os-linux.mak
@@ -7,11 +7,11 @@
 # (the library) for this specific operating system. Object files common 
 # to all operating systems should go in Makefile instead.
 #
-export PJLIB_OBJS += 	addr_resolv_sock.o guid_simple.o \
+export PJLIB_OBJS += 	addr_resolv_sock.o file_access_unistd.o \
+			file_io_ansi.o guid_simple.o \
 			log_writer_stdout.o os_core_unix.o \
 			os_error_unix.o os_time_unix.o \
 			os_timestamp_common.o os_timestamp_linux.o \
-			os_time_ansi.o \
 			pool_policy_malloc.o sock_bsd.o sock_select.o
 
 ifeq (epoll,$(LINUX_POLL))
@@ -20,8 +20,6 @@
 export PJLIB_OBJS += ioqueue_select.o 
 endif
 
-export PJLIB_OBJS += file_access_unistd.o file_io_ansi.o
-
 #
 # TEST_OBJS are operating system specific object files to be included in
 # the test application.
diff --git a/pjlib/build/os-sunos.mak b/pjlib/build/os-sunos.mak
index 2293105..5012888 100644
--- a/pjlib/build/os-sunos.mak
+++ b/pjlib/build/os-sunos.mak
@@ -7,11 +7,11 @@
 # (the library) for this specific operating system. Object files common 
 # to all operating systems should go in Makefile instead.
 #
-export PJLIB_OBJS += 	addr_resolv_sock.o guid_simple.o \
+export PJLIB_OBJS += 	addr_resolv_sock.o file_access_unistd.o \
+			file_io_ansi.o guid_simple.o \
 			log_writer_stdout.o os_core_unix.o \
 			os_error_unix.o os_time_unix.o \
 			os_timestamp_common.o os_timestamp_linux.o \
-			os_time_ansi.o \
 			pool_policy_malloc.o sock_bsd.o sock_select.o
 
 export PJLIB_OBJS += ioqueue_select.o 
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index 2e6995d..896cfd5 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -365,6 +365,19 @@
 #endif
 
 
+/**
+ * Include pj_stricmp_alnum() and pj_strnicmp_alnum(), i.e. custom
+ * functions to compare alnum strings. On some systems, they're faster
+ * then stricmp/strcasecmp, but they can be slower on other systems.
+ * When disabled, pjlib will fallback to stricmp/strnicmp.
+ * 
+ * Default: 0
+ */
+#ifndef PJ_HAS_STRICMP_ALNUM
+#   define PJ_HAS_STRICMP_ALNUM	    0
+#endif
+
+
 /** @} */
 
 /********************************************************************
diff --git a/pjlib/include/pj/string.h b/pjlib/include/pj/string.h
index 90ab29e..6831e04 100644
--- a/pjlib/include/pj/string.h
+++ b/pjlib/include/pj/string.h
@@ -369,8 +369,12 @@
  *      - 0	    if str1 is equal to str2
  *      - (-1)	    if not equal.
  */
+#if defined(PJ_HAS_STRICMP_ALNUM) && PJ_HAS_STRICMP_ALNUM!=0
 PJ_IDECL(int) strnicmp_alnum(const char *str1, const char *str2,
 			     int len);
+#else
+#define strnicmp_alnum	strnicmp
+#endif
 
 /**
  * Perform lowercase comparison to the strings which consists of only
@@ -387,7 +391,11 @@
  *      - 0	    if str1 is equal to str2
  *      - (-1)	    if not equal.
  */
+#if defined(PJ_HAS_STRICMP_ALNUM) && PJ_HAS_STRICMP_ALNUM!=0
 PJ_IDECL(int) pj_stricmp_alnum(const pj_str_t *str1, const pj_str_t *str2);
+#else
+#define pj_stricmp_alnum    pj_stricmp
+#endif
 
 /**
  * Perform lowercase comparison to the strings.
diff --git a/pjlib/include/pj/string_i.h b/pjlib/include/pj/string_i.h
index 25fc036..57cae7b 100644
--- a/pjlib/include/pj/string_i.h
+++ b/pjlib/include/pj/string_i.h
@@ -195,6 +195,7 @@
     }
 }
 
+#if defined(PJ_HAS_STRICMP_ALNUM) && PJ_HAS_STRICMP_ALNUM!=0
 PJ_IDEF(int) strnicmp_alnum( const char *str1, const char *str2,
 			     int len)
 {
@@ -263,6 +264,7 @@
 	    return 0;
     }
 }
+#endif	/* PJ_HAS_STRICMP_ALNUM */
 
 PJ_IDEF(int) pj_stricmp2( const pj_str_t *str1, const char *str2)
 {