[xiph-commits] r15795 - in trunk/ezstream: . src win32

moritz at svn.xiph.org moritz at svn.xiph.org
Wed Mar 18 12:55:23 PDT 2009


Author: moritz
Date: 2009-03-18 12:55:20 -0700 (Wed, 18 Mar 2009)
New Revision: 15795

Modified:
   trunk/ezstream/configure.in
   trunk/ezstream/src/compat.c
   trunk/ezstream/src/ezstream.c
   trunk/ezstream/src/ezstream.h
   trunk/ezstream/win32/ezstream.vcproj
Log:
Repair some fallout from previous commits, and work more on Win32 builds.


Modified: trunk/ezstream/configure.in
===================================================================
--- trunk/ezstream/configure.in	2009-03-18 09:10:28 UTC (rev 15794)
+++ trunk/ezstream/configure.in	2009-03-18 19:55:20 UTC (rev 15795)
@@ -228,13 +228,24 @@
 AC_CHECK_FUNCS([ \
 	arc4random \
 	basename \
+	getopt \
 	gettimeofday \
-	getopt \
 	nl_langinfo \
+	pclose \
+	_pclose \
+	popen \
+	_popen \
 	random \
 	setlocale \
+	snprintf \
+	_snprintf \
 	srandomdev \
 	stat \
+	_stat \
+	strncasecmp \
+	strnicmp \
+	strtoll \
+	_strtoi64 \
 ])
 
 AC_REPLACE_FUNCS([ \

Modified: trunk/ezstream/src/compat.c
===================================================================
--- trunk/ezstream/src/compat.c	2009-03-18 09:10:28 UTC (rev 15794)
+++ trunk/ezstream/src/compat.c	2009-03-18 19:55:20 UTC (rev 15795)
@@ -18,10 +18,10 @@
 # define PATH_SEPARATORS	"/"
 #endif /* !PATH_SEPARATORS */
 
+const char	*path_separators = PATH_SEPARATORS;
+
 char *	local_basename(const char *);
 
-static const char	*path_separators = PATH_SEPARATORS;
-
 static inline int
 	is_separator(int);
 
@@ -83,7 +83,7 @@
 	 * list as the default.
 	 */
 	if (endp == path && is_separator(*endp)) {
-		bname[0] = PATH_SEPARATOR;
+		bname[0] = path_separators[0];
 		bname[1] = '\0';
 		return (bname);
 	}

Modified: trunk/ezstream/src/ezstream.c
===================================================================
--- trunk/ezstream/src/ezstream.c	2009-03-18 09:10:28 UTC (rev 15794)
+++ trunk/ezstream/src/ezstream.c	2009-03-18 19:55:20 UTC (rev 15795)
@@ -1044,7 +1044,7 @@
 
 	if (argv0 == NULL)
 		return ((char *)"ezstream");
-	p = strrchr(argv0, PATH_SEPARATOR);
+	p = strrchr(argv0, path_separators[0]);
 	if (p == NULL)
 		p = (char *)argv0;
 	else

Modified: trunk/ezstream/src/ezstream.h
===================================================================
--- trunk/ezstream/src/ezstream.h	2009-03-18 09:10:28 UTC (rev 15794)
+++ trunk/ezstream/src/ezstream.h	2009-03-18 19:55:20 UTC (rev 15795)
@@ -57,25 +57,38 @@
 # endif /* WIN32 */
 #endif /* !_PATH_DEVNULL */
 
-#ifdef WIN32
-# include <windows.h>
-
+#if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
 # define pclose 	_pclose
+#endif /* !HAVE_PCLOSE && HAVE__PCLOSE */
+#if !defined(HAVE_POPEN) && defined(HAVE__POPEN)
 # define popen		_popen
+#endif /* !HAVE_POPEN && HAVE__POPEN */
+#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
 # define snprintf	_snprintf
+#endif /* !HAVE_SNPRINTF && HAVE__SNPRINTF */
+#if !defined(HAVE_STAT) && defined(HAVE__STAT)
 # define stat		_stat
+#endif /* !HAVE_STAT && HAVE__STAT */
+#if !defined(HAVE_STRNCASECMP) && defined(HAVE_STRNICMP)
 # define strncasecmp	strnicmp
-# ifndef __GNUC__
-#  define strtoll	_strtoi64
-# endif /* !__GNUC__ */
+#endif /* !HAVE_STRNCASECMP && HAVE_STRNICMP */
+#if !defined(HAVE_STRTOLL) && defined(HAVE__STRTOI64)
+# define strtoll	_strtoi64
+#endif /* !HAVE_STRTOLL && HAVE__STRTOI64 */
 
+#ifndef S_IRGRP
 # define S_IRGRP	0
+# define S_IWGRP	0
+# define S_IXGRP	0
+#endif /* !S_IRGRP */
+#ifndef S_IROTH
 # define S_IROTH	0
-# define S_IWGRP	0
 # define S_IWOTH	0
-# define S_IXGRP	0
 # define S_IXOTH	0
+#endif /* !S_IROTH */
 
+#ifdef WIN32
+# include <windows.h>
 # define sleep(a)	Sleep((a) * 1000)
 #endif /* WIN32 */
 
@@ -98,6 +111,9 @@
 
 extern int
 	local_getopt(int, char * const *, const char *);
+
+extern const char *path_separators;
+
 extern char *
 	local_basename(const char *);
 

Modified: trunk/ezstream/win32/ezstream.vcproj
===================================================================
--- trunk/ezstream/win32/ezstream.vcproj	2009-03-18 09:10:28 UTC (rev 15794)
+++ trunk/ezstream/win32/ezstream.vcproj	2009-03-18 19:55:20 UTC (rev 15795)
@@ -244,11 +244,11 @@
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
 			>
 			<File
-				RelativePath="..\src\compat.h"
+				RelativePath="..\src\configfile.h"
 				>
 			</File>
 			<File
-				RelativePath="..\src\configfile.h"
+				RelativePath="..\src\ezstream.h"
 				>
 			</File>
 			<File



More information about the commits mailing list