[Freeswitch-svn] [commit] r4895 - freeswitch/trunk/src/include

Freeswitch SVN mikej at freeswitch.org
Sun Apr 8 13:18:12 EDT 2007


Author: mikej
Date: Sun Apr  8 13:18:12 2007
New Revision: 4895

Modified:
   freeswitch/trunk/src/include/switch.h

Log:
It appears that we should be able to include strings.h only, except msvc does not have strings.h:

and at least some linux implementations do not work unless you include both, which seems to be against spec, but should not hurt.  The most correct thing to do here would be to include strings.h then string.h wrapped in autoconf detected defines, but this should work for now.  If it is still an issue going forward, we will need to add some defines for detected presence of some header files to the public header files, which should be done with care to avoid define collisions in public header files.

http://www.opengroup.org/onlinepubs/009695399/basedefs/strings.h.html
http://www.opengroup.org/onlinepubs/009695399/basedefs/string.h.html


Modified: freeswitch/trunk/src/include/switch.h
==============================================================================
--- freeswitch/trunk/src/include/switch.h	(original)
+++ freeswitch/trunk/src/include/switch.h	Sun Apr  8 13:18:12 2007
@@ -59,11 +59,10 @@
 #include <setjmp.h>
 #include <ctype.h>
 #include <fcntl.h>
-#ifdef _MSC_VER
-#include <string.h>
-#else
+#ifndef _MSC_VER
 #include <strings.h>
 #endif
+#include <string.h>
 #include <sys/stat.h>
 #include <limits.h>
 #include <sys/types.h>



More information about the Freeswitch-svn mailing list