pidgin: 5f944d9a: MSVC build fixes

datallah at pidgin.im datallah at pidgin.im
Sun May 11 22:35:40 EDT 2008


-----------------------------------------------------------------
Revision: 5f944d9a35a6f30cfb32691afa6bd7a2b6ed7268
Ancestor: ef3e9e2c0d76f5eb30c26d818db177d1fbf3de78
Author: datallah at pidgin.im
Date: 2008-05-12T02:17:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5f944d9a35a6f30cfb32691afa6bd7a2b6ed7268

Modified files:
        libpurple/protocols/jabber/win32/posix.uname.c
        libpurple/protocols/jabber/win32/utsname.h

ChangeLog: 

MSVC build fixes

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/win32/posix.uname.c	92ce5a4f7972b123166c3ac0f5f38d8684e00359
+++ libpurple/protocols/jabber/win32/posix.uname.c	ff42b6e5c8cc0aab6008d01da99e4c81b06dc456
@@ -33,10 +33,12 @@
 /*#define _ANONYMOUS_STRUCT*/
 /*#define _ANONYMOUS_UNION*/
 #include <windows.h>
+#ifdef __MINGW32__
 #include <_mingw.h>
+#endif
 
 int
-uname( struct utsname *uts )
+jabber_win32_uname( struct utsname *uts )
 {
   DWORD sLength;
   OSVERSIONINFO OS_version;
@@ -52,7 +54,7 @@ uname( struct utsname *uts )
   GetVersionEx ( &OS_version );
   GetSystemInfo ( &System_Info );
 
-  strcpy( uts->sysname, "MINGW_" );
+  strcpy( uts->sysname, "WIN32_" );
   switch( OS_version.dwPlatformId )
   {
     case VER_PLATFORM_WIN32_NT:
@@ -82,8 +84,10 @@ uname( struct utsname *uts )
       break;
   }
 
+#ifdef __MINGW32__
   sprintf( uts->version, "%i", __MINGW32_MAJOR_VERSION );
   sprintf( uts->release, "%i", __MINGW32_MINOR_VERSION );
+#endif
 
   switch( System_Info.wProcessorArchitecture )
   {
============================================================
--- libpurple/protocols/jabber/win32/utsname.h	ab02c4ecddd1ef30f386bc675a49f803ef4fae1f
+++ libpurple/protocols/jabber/win32/utsname.h	1d9301e52715760025647ad750c857ac29d50ef1
@@ -14,7 +14,8 @@ struct utsname
   char machine[20];
 };
 
-int uname (struct utsname *);
+int jabber_win32_uname (struct utsname *);
+#define uname(utsname) jabber_win32_uname(utsname)
 
 #ifdef __cplusplus
 }


More information about the Commits mailing list