]> git.sesse.net Git - vlc/commitdiff
* ALL: libvlc now compiles and run under WinCE. I haven't ported any modules
authorSam Hocevar <sam@videolan.org>
Sun, 10 Nov 2002 23:41:54 +0000 (23:41 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 10 Nov 2002 23:41:54 +0000 (23:41 +0000)
    yet so there's little that can be tested, but threads work at least.
  * ./src/extras/libc.c: renamed strndup.c to libc.c because a few other
    libc functions were added (strcasecmp, atof, getenv...).

15 files changed:
Makefile.am
configure.ac.in
include/vlc_common.h
msvc/vlc.dsp
msvc/vlc.vcp
msvc/vlc.vcp.in
src/extras/dirent.c
src/extras/libc.c [new file with mode: 0644]
src/extras/strndup.c [deleted file]
src/input/input_ext-plugins.c
src/libvlc.c
src/misc/configuration.c
src/misc/threads.c
src/video_output/video_text.c
src/vlc.c

index 8553e4d264b8f1fdee0f9d7a3e8405450c6e8d89..81272a83430960d2f997ca89dbea4f3c21b16bf9 100644 (file)
@@ -288,7 +288,7 @@ show-vlc-sources: FORCE
        @echo X: $(vlc_SOURCES)
 
 show-libvlc-sources: FORCE
-       @echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt) $(SOURCES_libvlc_strndup)
+       @echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt) $(SOURCES_libvlc_libc)
 
 show-libvlc-headers: FORCE
        @echo X: $(HEADERS_include) $(HEADERS_include_built)
@@ -327,8 +327,8 @@ endif
 if BUILD_GETOPT
 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
 endif
-if BUILD_STRNDUP
-OPT_SOURCES_libvlc_strndup = $(SOURCES_libvlc_strndup)
+if BUILD_LIBC
+OPT_SOURCES_libvlc_libc = $(SOURCES_libvlc_libc)
 endif
 if BUILD_MOZILLA
 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
@@ -340,7 +340,7 @@ EXTRA_DIST += \
        $(SOURCES_libvlc_win32) \
        $(SOURCES_libvlc_dirent) \
        $(SOURCES_libvlc_getopt) \
-       $(SOURCES_libvlc_strndup) \
+       $(SOURCES_libvlc_libc) \
        $(NULL)
 
 SOURCES_libvlc_beos = \
@@ -366,8 +366,8 @@ SOURCES_libvlc_getopt = \
        src/extras/getopt1.c \
        $(NULL)
 
-SOURCES_libvlc_strndup = \
-       src/extras/strndup.c
+SOURCES_libvlc_libc = \
+       src/extras/libc.c
        $(NULL)
 
 SOURCES_libvlc_common = \
@@ -419,7 +419,7 @@ SOURCES_libvlc = \
        $(OPT_SOURCES_libvlc_win32) \
        $(OPT_SOURCES_libvlc_dirent) \
        $(OPT_SOURCES_libvlc_getopt) \
-       $(OPT_SOURCES_libvlc_strndup) \
+       $(OPT_SOURCES_libvlc_libc) \
        $(NULL)
 
 ###############################################################################
index bf09fd5c0e2500b748859719892870b22155419d..f66d6d3f8ef1641f7d6b153bd671d9857839a41b 100644 (file)
@@ -214,12 +214,19 @@ dnl The -DSYS_FOO flag
 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
 
 dnl Check for system libs needed
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll)
+need_libc=false
 
-dnl Check for strndup
-need_strndup=false
-AC_CHECK_FUNCS(strndup,,[need_strndup=:])
-AM_CONDITIONAL(BUILD_STRNDUP, ${need_strndup})
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
+
+dnl Check for usual libc functions
+AC_CHECK_FUNCS(strdup,,[need_libc=:])
+AC_CHECK_FUNCS(strndup,,[need_libc=:])
+AC_CHECK_FUNCS(atof,,[need_libc=:])
+AC_CHECK_FUNCS(lseek,,[need_libc=:])
+AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp,,[need_libc=:])])
+AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp,,[need_libc=:])])
+
+AM_CONDITIONAL(BUILD_LIBC, ${need_libc})
 
 AC_CHECK_FUNC(connect,,[
   AC_CHECK_LIB(socket,connect,
index b39128b1970ec0628b22b5c89f7b081bde91d7fc..d206019c664670c60336beec77d20afa0de188d2 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.35 2002/11/08 10:26:52 gbazin Exp $
+ * $Id: vlc_common.h,v 1.36 2002/11/10 23:41:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -467,9 +467,39 @@ static inline uint64_t U64_AT( void * _p )
 
 #endif
 
-/* strndup (defined in src/misc/extras.c) */
+/* strdup/strndup (defined in src/extras/libc.c) */
+#ifndef HAVE_STRDUP
+    char * strdup( const char *s );
+#endif
 #ifndef HAVE_STRNDUP
-char * strndup( const char *s, size_t n );
+    char * strndup( const char *s, size_t n );
+#endif
+
+/* atof (defined in src/extras/libc.c) */
+#ifndef HAVE_ATOF
+    double atof( const char *nptr );
+#endif
+
+/* getenv - always returns NULL */
+#ifndef HAVE_GETENV
+    char *getenv( const char *name );
+#endif
+
+/* strncasecmp/strcasecmp (defined in src/extras/libc.c) */
+#ifndef HAVE_STRCASECMP
+#   ifdef HAVE_STRICMP
+#       define strcasecmp stricmp
+#   else
+        int strcasecmp( const char *s1, const char *s2 );
+#   endif
+#endif
+
+#ifndef HAVE_STRNCASECMP
+#   ifdef HAVE_STRNICMP
+#       define strncasecmp strnicmp
+#   else
+        int strncasecmp( const char *s1, const char *s2, size_t n );
+#   endif
 #endif
 
 /* Format type specifiers for 64 bits numbers */
@@ -501,8 +531,6 @@ char * strndup( const char *s, size_t n );
 #   if defined( _MSC_VER ) || !defined( __MINGW32__ )
 #       define __attribute__(x)
 #       define __inline__      __inline
-#       define strncasecmp     strnicmp
-#       define strcasecmp      stricmp
 #       define S_IFBLK         0x3000  /* Block */
 #       define S_ISBLK(m)      (0)
 #       define S_ISCHR(m)      (0)
@@ -549,6 +577,11 @@ typedef __int64 off_t;
 
 #endif
 
+/* lseek (defined in src/extras/libc.c) */
+#ifndef HAVE_ATOF
+    off_t lseek( int fildes, off_t offset, int whence );
+#endif
+
 /*****************************************************************************
  * CPU capabilities
  *****************************************************************************/
index ac4ef4233da880336692fd34fd804a5a3413afa2..3abbd5abeca1c0acfe50894c83de1d4549aecc8f 100644 (file)
@@ -236,7 +236,7 @@ SOURCE="..\src\extras\getopt1.c"
 !ENDIF\r
 # End Source File\r
 # Begin Source File\r
-SOURCE="..\src\extras\strndup.c"\r
+SOURCE="..\src\extras\libc.c"\r
 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"\r
 !IF "$(CFG)" == "vlc - Win32 Release"\r
 # PROP Intermediate_Dir "Release\extras"\r
@@ -440,7 +440,7 @@ SOURCE="..\src\misc\iso_lang.c"
 !ENDIF\r
 # End Source File\r
 # Begin Source File\r
-SOURCE="..\src\misc\iso-639.def"\r
+SOURCE="..\src\misc\iso-639_def.h"\r
 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"\r
 !IF "$(CFG)" == "vlc - Win32 Release"\r
 # PROP Intermediate_Dir "Release\misc"\r
index 58b43944c76d1d2c22b682b1632c1077112ff6e0..ba5ffc5480285ca0c553dd1b21814425506d4aba 100644 (file)
@@ -60,7 +60,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r\r
 CPP=clmips.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -92,7 +93,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r\r
 CPP=clmips.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -124,7 +126,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Qsh4 /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Qsh4 /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Qsh4 /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -156,7 +159,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /Qsh4 /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /Qsh4 /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Qsh4 /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -188,7 +192,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -220,7 +225,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -252,7 +258,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
 CPP=clarm.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -284,7 +291,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
 CPP=clarm.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -316,7 +324,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
 CPP=cl.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gz /Oxs /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gz /Oxs /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Gz /Oxs /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -348,7 +357,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
 CPP=cl.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gz /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gz /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Gz /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -814,7 +824,7 @@ SOURCE="..\src\extras\getopt1.c"
 !ENDIF\r
 # End Source File\r
 # Begin Source File\r
-SOURCE="..\src\extras\strndup.c"\r
+SOURCE="..\src\extras\libc.c"\r
 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"\r
 !IF "$(CFG)" == "vlc - Win32 (WCE MIPS) Release"\r
 # PROP Intermediate_Dir "Release\extras"\r
@@ -1450,7 +1460,7 @@ SOURCE="..\src\misc\iso_lang.c"
 !ENDIF\r
 # End Source File\r
 # Begin Source File\r
-SOURCE="..\src\misc\iso-639.def"\r
+SOURCE="..\src\misc\iso-639_def.h"\r
 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"\r
 !IF "$(CFG)" == "vlc - Win32 (WCE MIPS) Release"\r
 # PROP Intermediate_Dir "Release\misc"\r
index ef97f22864e42e8cd56f5bfbffe2282e0cfeee28..da2454d767711ac24c1bcf2213d60b53e6647590 100644 (file)
@@ -60,7 +60,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r\r
 CPP=clmips.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -92,7 +93,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r\r
 CPP=clmips.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -124,7 +126,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Qsh4 /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Qsh4 /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Qsh4 /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -156,7 +159,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /Qsh4 /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /Qsh4 /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Qsh4 /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -188,7 +192,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -220,7 +225,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r\r
 CPP=shcl.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -252,7 +258,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
 CPP=clarm.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Oxs /M$(CECrtMT) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -284,7 +291,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
 CPP=clarm.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /M$(CECrtMTDebug) /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -316,7 +324,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
 CPP=cl.exe\r
 # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gz /Oxs /c\r
-# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gz /Oxs /c\r
+# ADD CPP /nologo /W3 /I "." /I "..\include" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Gz /Oxs /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
@@ -348,7 +357,8 @@ RSC=rc.exe
 # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
 CPP=cl.exe\r
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gz /c\r
-# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gz /c\r
+# ADD CPP /nologo /W3 /Zi /Od /I "." /I "..\include" /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Gz /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
 MTL=midl.exe\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
index 3be39fa1cebe033aade4fd3993c050c479d2f7d3..0ef479604d2a184a1c541f612266ad502bb962e4 100644 (file)
@@ -9,9 +9,9 @@
  * Significantly revised and rewinddir, seekdir and telldir added by Colin
  * Peters <colin@fu.is.saga-u.ac.jp>
  *     
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
  * $Author: sam $
- * $Date: 2002/11/10 18:04:23 $
+ * $Date: 2002/11/10 23:41:53 $
  *
  */
 
@@ -89,12 +89,13 @@ opendir (const CHAR *szPath)
 #if defined( UNDER_CE )
   if (szPath[0] == '\\' || szPath[0] == '/')
     {
-      snprintf (szFullPath, MAX_PATH, "%s", szPath);
+      sprintf (szFullPath, MAX_PATH, "%s", szPath);
       szFullPath[0] = '\\';
     }
   else
     {
-      snprintf (szFullPath, MAX_PATH, "\\%s", szPath );
+      /* FIXME: if I wasn't lazy, I'dcheck for overflows here. */
+      sprintf (szFullPath, MAX_PATH, "\\%s", szPath );
     }
 #else
   _fullpath (szFullPath, szPath, MAX_PATH);
diff --git a/src/extras/libc.c b/src/extras/libc.c
new file mode 100644 (file)
index 0000000..0b66f61
--- /dev/null
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * libc.c: Extra libc function for some systems.
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: libc.c,v 1.1 2002/11/10 23:41:53 sam Exp $
+ *
+ * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
+ *          Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+#include <string.h>                                              /* strdup() */
+#include <stdlib.h>
+
+#include <vlc/vlc.h>
+
+/*****************************************************************************
+ * getenv: just in case, but it should never be called
+ *****************************************************************************/
+#ifndef HAVE_GETENV
+char *getenv( const char *name )
+{
+    return NULL;
+}
+#endif
+
+/*****************************************************************************
+ * strdup: returns a malloc'd copy of a string 
+ *****************************************************************************/
+#ifndef HAVE_STRDUP
+char *strdup( const char *string )
+{
+    return strndup( string, strlen( string ) );
+}
+#endif
+
+/*****************************************************************************
+ * strndup: returns a malloc'd copy of at most n bytes of string 
+ * Does anyone know whether or not it will be present in Jaguar?
+ *****************************************************************************/
+#ifndef HAVE_STRDUP
+char *strndup( const char *string, size_t n )
+{
+    char *psz;
+    size_t len = strlen( string );
+
+    len = __MIN( len, n ); 
+    psz = (char*)malloc( len + 1 );
+
+    if( psz != NULL )
+    {
+        memcpy( (void*)psz, (const void*)string, len );
+        psz[ len ] = 0;
+    }
+
+    return( psz );
+}
+#endif
+
+/*****************************************************************************
+ * strcasecmp: compare two strings ignoring case
+ *****************************************************************************/
+#if !defined( HAVE_STRCASECMP ) && !defined( HAVE_STRICMP )
+int strcasecmp( const char *s1, const char *s2 )
+{
+    int i_delta = 0;
+
+    while( !i_delta && *s1 && *s2 )
+    {
+        i_delta = *s1 - *s2;
+
+        if( *s1 >= 'A' && *s1 <= 'Z' )
+        {
+            i_delta -= 'A' - 'a';
+        }
+
+        if( *s2 >= 'A' && *s2 <= 'Z' )
+        {
+            i_delta += 'A' - 'a';
+        }
+    }
+
+    return i_delta;
+}
+#endif
+
+/*****************************************************************************
+ * strncasecmp: compare n chars from two strings ignoring case
+ *****************************************************************************/
+#if !defined( HAVE_STRNCASECMP ) && !defined( HAVE_STRNICMP )
+int strncasecmp( const char *s1, const char *s2, size_t n )
+{
+    int i_delta = 0;
+
+    while( n-- && !i_delta && *s1 )
+    {
+        i_delta = *s1 - *s2;
+
+        if( *s1 >= 'A' && *s1 <= 'Z' )
+        {
+            i_delta -= 'A' - 'a';
+        }
+
+        if( *s2 >= 'A' && *s2 <= 'Z' )
+        {
+            i_delta += 'A' - 'a';
+        }
+    }
+
+    return i_delta;
+}
+#endif
+
+/*****************************************************************************
+ * atof: convert a string to a double.
+ *****************************************************************************/
+#ifndef HAVE_ATOF
+double atof( const char *nptr )
+{ 
+    double f_result;
+    wchar_t *psz_tmp;
+    int i_len = strlen( nptr ) + 1;
+  
+    psz_tmp = malloc( i_len * sizeof(wchar_t) );
+    MultiByteToWideChar( CP_ACP, 0, nptr, -1, psz_tmp, i_len );
+    f_result = wcstod( psz_tmp, NULL );
+    free( psz_tmp );
+
+    return f_result;
+}
+#endif
+
+/*****************************************************************************
+ * lseek: reposition read/write file offset.
+ *****************************************************************************
+ * FIXME: this cast sucks!
+ *****************************************************************************/
+#if !defined( HAVE_LSEEK )
+off_t lseek( int fildes, off_t offset, int whence )
+{
+    return SetFilePointer( (HANDLE)fildes, offset, NULL, whence );
+}
+#endif
+
diff --git a/src/extras/strndup.c b/src/extras/strndup.c
deleted file mode 100644 (file)
index 5cced1d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * strndup.c: Extra strndup function for some systems.
- *****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: strndup.c,v 1.1 2002/11/09 16:34:52 sam Exp $
- *
- * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
- *****************************************************************************/
-#include <string.h>                                              /* strdup() */
-#include <stdlib.h>
-
-#include <vlc/vlc.h>
-
-/*****************************************************************************
- * strndup: returns a malloc'd copy of at most n bytes of string 
- * Does anyone know whether or not it will be present in Jaguar?
- *****************************************************************************/
-char *strndup( const char *string, size_t n )
-{
-    char *psz;
-    size_t len = strlen( string );
-
-    len = __MIN( len, n ); 
-    psz = (char*)malloc( len + 1 );
-
-    if( psz != NULL )
-    {
-        memcpy( (void*)psz, (const void*)string, len );
-        psz[ len ] = 0;
-    }
-
-    return( psz );
-}
-
index a4fdbfc10b414082ff397a43e02dee7f6adda8c3..c26270427435f255b027f67365bc46718c1f12fb 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-plugins.c: useful functions for access and demux plug-ins
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: input_ext-plugins.c,v 1.20 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_ext-plugins.c,v 1.21 2002/11/10 23:41:53 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -669,7 +669,12 @@ void __input_FDClose( vlc_object_t * p_this )
     msg_Info( p_input, "closing `%s/%s://%s'", 
               p_input->psz_access, p_input->psz_demux, p_input->psz_name );
  
+#ifdef UNDER_CE
+    CloseHandle( (HANDLE)p_access_data->i_handle );
+#else
     close( p_access_data->i_handle );
+#endif
+
     free( p_access_data );
 }
 
@@ -684,7 +689,9 @@ void __input_FDNetworkClose( vlc_object_t * p_this )
     msg_Info( p_input, "closing network `%s/%s://%s'", 
               p_input->psz_access, p_input->psz_demux, p_input->psz_name );
  
-#if defined( WIN32 ) && !defined( UNDER_CE )
+#ifdef UNDER_CE
+    CloseHandle( (HANDLE)p_access_data->i_handle );
+#elif defined( WIN32 )
     closesocket( p_access_data->i_handle );
 #else
     close( p_access_data->i_handle );
@@ -699,16 +706,25 @@ void __input_FDNetworkClose( vlc_object_t * p_this )
 ssize_t input_FDRead( input_thread_t * p_input, byte_t * p_buffer, size_t i_len )
 {
     input_socket_t * p_access_data = (input_socket_t *)p_input->p_access_data;
+    ssize_t i_ret;
  
-    ssize_t i_ret = read( p_access_data->i_handle, p_buffer, i_len );
+#ifdef UNDER_CE
+    if( !ReadFile( (HANDLE)p_access_data->i_handle, p_buffer, i_len,
+                   (LPWORD)&i_ret, NULL ) )
+    {
+        i_ret = -1;
+    }
+#else
+    i_ret = read( p_access_data->i_handle, p_buffer, i_len );
+#endif
  
     if( i_ret < 0 )
     {
-#ifdef HAVE_ERRNO_H
+#   ifdef HAVE_ERRNO_H
         msg_Err( p_input, "read failed (%s)", strerror(errno) );
-#else
+#   else
         msg_Err( p_input, "read failed" );
-#endif
+#   endif
     }
  
     return i_ret;
index 2e77f5b41cdf4d558f30dfd4e8d79a65b3725600..4439ed00ec5e6a86f3a46aafa0dcb856c6242a1b 100644 (file)
@@ -2,7 +2,7 @@
  * libvlc.c: main libvlc source
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.c,v 1.45 2002/11/10 18:04:23 sam Exp $
+ * $Id: libvlc.c,v 1.46 2002/11/10 23:41:53 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -1265,10 +1265,12 @@ static void Version( void )
 #ifdef WIN32 /*  */
 static void ShowConsole( void )
 {
+#   ifndef UNDER_CE
     AllocConsole();
     freopen( "CONOUT$", "w", stdout );
     freopen( "CONOUT$", "w", stderr );
     freopen( "CONIN$", "r", stdin );
+#   endif
     return;
 }
 #endif
index 455f05552be5f1b198846640bba7c7cab64b8824..b1163474e3cb088bee93a505016a86f46eb3f5a3 100644 (file)
@@ -2,7 +2,7 @@
  * configuration.c management of the modules configuration
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.43 2002/11/10 18:04:23 sam Exp $
+ * $Id: configuration.c,v 1.44 2002/11/10 23:41:53 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -520,7 +520,7 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
 
         /* The config file is organized in sections, one per module. Look for
          * the interesting section ( a section is of the form [foo] ) */
-        rewind( file );
+        fseek( file, 0L, SEEK_SET );
         while( fgets( line, 1024, file ) )
         {
             if( (line[0] == '[')
@@ -687,7 +687,17 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
     }
     sprintf( psz_filename, "%s/" CONFIG_DIR, psz_homedir );
 
-#ifdef HAVE_ERRNO_H
+#if defined( UNDER_CE )
+    {
+        wchar_t psz_new[ MAX_PATH ];
+        MultiByteToWideChar( CP_ACP, 0, psz_filename, -1, psz_new, MAX_PATH );
+        if( CreateDirectory( psz_new, NULL ) )
+        {
+            msg_Err( p_this, "could not create %s", psz_filename );
+        }
+    }
+
+#elif defined( HAVE_ERRNO_H )
 #   if defined( WIN32 )
     if( mkdir( psz_filename ) && errno != EEXIST )
 #   else
@@ -719,9 +729,9 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
     else
     {
         /* look for file size */
-        fseek( file, 0, SEEK_END );
+        fseek( file, 0L, SEEK_END );
         i_sizebuf = ftell( file );
-        rewind( file );
+        fseek( file, 0L, SEEK_SET );
     }
 
     p_bigbuffer = p_index = malloc( i_sizebuf+1 );
index 5141bd56bac05376400b79dd33154ed6cff67072..68d556414fc94272c2a1446be9d3bf4b266e635e 100644 (file)
@@ -2,7 +2,7 @@
  * threads.c : threads implementation for the VideoLAN client
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: threads.c,v 1.24 2002/11/10 18:04:24 sam Exp $
+ * $Id: threads.c,v 1.25 2002/11/10 23:41:53 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -77,6 +77,7 @@ int __vlc_threads_init( vlc_object_t *p_this )
      * hope nothing wrong happens. */
 #if defined( PTH_INIT_IN_PTH_H )
 #elif defined( ST_INIT_IN_ST_H )
+#elif defined( UNDER_CE )
 #elif defined( WIN32 )
     HINSTANCE hInstLib;
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
@@ -556,10 +557,16 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
         unsigned threadID;
         /* When using the MSVCRT C library you have to use the _beginthreadex
          * function instead of CreateThread, otherwise you'll end up with
-        * memory leaks and the signal functions not working */
+         * memory leaks and the signal functions not working (see Microsoft
+         * Knowledge Base, article 104641) */
         p_this->thread_id =
+#if defined( UNDER_CE )
+                (HANDLE)CreateThread( NULL, 0, (PTHREAD_START) func, 
+                                      (void *)p_this, 0, &threadID );
+#else
                 (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, 
                                         (void *)p_this, 0, &threadID );
+#endif
     }
 
     if ( p_this->thread_id && i_priority )
@@ -628,8 +635,13 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
     }
     else
     {
+#ifdef HAVE_STRERROR
         msg_Err( p_this, "%s thread could not be created at %s:%d (%s)",
                          psz_name, psz_file, i_line, strerror(i_ret) );
+#else
+        msg_Err( p_this, "%s thread could not be created at %s:%d",
+                         psz_name, psz_file, i_line );
+#endif
         vlc_mutex_unlock( &p_this->object_lock );
     }
 
@@ -677,8 +689,13 @@ void __vlc_thread_join( vlc_object_t *p_this, char * psz_file, int i_line )
 
     if( i_ret )
     {
+#ifdef HAVE_STRERROR
         msg_Err( p_this, "thread_join(%d) failed at %s:%d (%s)",
                          p_this->thread_id, psz_file, i_line, strerror(i_ret) );
+#else
+        msg_Err( p_this, "thread_join(%d) failed at %s:%d",
+                         p_this->thread_id, psz_file, i_line );
+#endif
     }
     else
     {
index 712b759115d4bea4d87455b26f806f47b66a78f9..6d4aed1bb6716b604b85cd712cf4581eba4736e2 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_text.c,v 1.38 2002/11/10 18:04:24 sam Exp $
+ * $Id: video_text.c,v 1.39 2002/11/10 23:41:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -277,19 +277,23 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
     }
 
     /* Read magic number */
+#ifndef UNDER_CE /* FIXME */
     if( read( i_file, pi_buffer, 2 ) != 2 )
     {
         msg_Err( p_vout, "unexpected end of file in '%s'", psz_name );
         close( i_file );
         return( NULL );
     }
+#endif
 
     /* Allocate font descriptor */
     p_font = malloc( sizeof( vout_font_t ) );
     if( p_font == NULL )
     {
         msg_Err( p_vout, "out of memory" );
+#ifndef UNDER_CE /* FIXME */
         close( i_file );
+#endif
         return( NULL );
     }
 
@@ -303,6 +307,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
          */
 
         /* Read font header - two bytes indicate the font properties */
+#ifndef UNDER_CE /* FIXME */
         if( read( i_file, pi_buffer, 2 ) != 2)
         {
             msg_Err( p_vout, "unexpected end of file in '%s'", psz_name );
@@ -310,6 +315,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
             close( i_file );
             return( NULL );
         }
+#endif
 
         /* Copy font properties */
         p_font->i_type =                VOUT_FIXED_FONT;
@@ -327,11 +333,14 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
         {
             msg_Err( p_vout, "out of memory" );
             free( p_font );
+#ifndef UNDER_CE /* FIXME */
             close( i_file );
+#endif
             return( NULL );
         }
 
         /* Copy raw data */
+#ifndef UNDER_CE /* FIXME */
         if( read( i_file, p_font->p_data, 256 * pi_buffer[1] ) != 256 * pi_buffer[1] )
         {
             msg_Err( p_vout, "unexpected end of file in '%s'", psz_name );
@@ -340,6 +349,7 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
             close( i_file );
             return( NULL );
         }
+#endif
 
         /* Compute border masks - remember that masks have the same matrix as
          * characters, so an empty character border is required to have a
@@ -362,7 +372,9 @@ vout_font_t *vout_LoadFont( vout_thread_t *p_vout, const char *psz_name )
     default:
         msg_Err( p_vout, "file '%s' has an unknown format", psz_name );
         free( p_font );
+#ifndef UNDER_CE /* FIXME */
         close( i_file );
+#endif
         return( NULL );
         break;
     }
index 8f49a91b961c23cf449bbc72d03e73571e5681a1..5f01a83c241a7d0b09e6023daedaf76d0675984a 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -2,7 +2,7 @@
  * vlc.c: the vlc player
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vlc.c,v 1.16 2002/11/10 18:04:23 sam Exp $
+ * $Id: vlc.c,v 1.17 2002/11/10 23:41:53 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 #   include <time.h>                                               /* time() */
 #endif
 
+#ifdef UNDER_CE
+    /* WinCE needs a WINAPI declaration */
+#   define WIN32_LEAN_AND_MEAN
+#   include <windows.h>
+#endif
+
 #include <vlc/vlc.h>
 
 /*****************************************************************************
@@ -47,9 +53,18 @@ static void SigHandler  ( int i_signal );
 /*****************************************************************************
  * main: parse command line, start interface and spawn threads
  *****************************************************************************/
+#ifdef UNDER_CE
+int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
+                    LPTSTR lpCmdLine, int nCmdShow )
+#else
 int main( int i_argc, char *ppsz_argv[] )
+#endif
 {
     int i_ret;
+#ifdef UNDER_CE
+    int i_argc = 1;
+    char *ppsz_argv[] = { lpCmdLine, NULL };
+#endif
 
     fprintf( stderr, "VideoLAN Client %s\n", VLC_Version() );