[vlc-devel] commit: Fix win32 linking ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 24 11:55:19 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sat May 24 12:56:52 2008 +0300| [c80de559fa80947d00a98561ab1f506bcf910d0c]

Fix win32 linking

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c80de559fa80947d00a98561ab1f506bcf910d0c
---

 include/vlc_common.h |    2 +-
 src/extras/libc.c    |   10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 172d8af..169a1a2 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -722,7 +722,7 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 VLC_EXPORT( int, vlc_vasprintf, (char **, const char *, va_list ) );
 VLC_EXPORT( int, vlc_asprintf, (char **, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) );
 VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) );
-VLC_EXPORT( int64_t, vlc_strtoll, ( const char *nptr, char **endptr, int base ) );
+VLC_EXPORT( long long, vlc_strtoll, ( const char *nptr, char **endptr, int base ) );
 
 VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) );
 
diff --git a/src/extras/libc.c b/src/extras/libc.c
index 39d6250..f2b9019 100644
--- a/src/extras/libc.c
+++ b/src/extras/libc.c
@@ -167,10 +167,12 @@ int vlc_asprintf( char **strp, const char *fmt, ... )
 /*****************************************************************************
  * strtoll: convert a string to a 64 bits int.
  *****************************************************************************/
-#if !defined( HAVE_STRTOLL )
-int64_t vlc_strtoll( const char *nptr, char **endptr, int base )
+long long vlc_strtoll( const char *nptr, char **endptr, int base )
 {
-    int64_t i_value = 0;
+#if defined( HAVE_STRTOLL )
+    return strtoll( nptr, endptr, base );
+#else
+    long long i_value = 0;
     int sign = 1, newbase = base ? base : 10;
 
     while( isspace(*nptr) ) nptr++;
@@ -233,8 +235,8 @@ int64_t vlc_strtoll( const char *nptr, char **endptr, int base )
     }
 
     return i_value * sign;
-}
 #endif
+}
 
 /**
  * Copy a string to a sized buffer. The result is always nul-terminated




More information about the vlc-devel mailing list