Mercurial > pidgin.yaz
changeset 22911:da022013ec2a
MSVC build fixes
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 12 May 2008 02:17:00 +0000 |
parents | 3f9877080462 |
children | 9004da91edd3 |
files | libpurple/protocols/jabber/win32/posix.uname.c libpurple/protocols/jabber/win32/utsname.h |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/win32/posix.uname.c Mon May 12 02:13:40 2008 +0000 +++ b/libpurple/protocols/jabber/win32/posix.uname.c Mon May 12 02:17:00 2008 +0000 @@ -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 @@ 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 @@ break; } +#ifdef __MINGW32__ sprintf( uts->version, "%i", __MINGW32_MAJOR_VERSION ); sprintf( uts->release, "%i", __MINGW32_MINOR_VERSION ); +#endif switch( System_Info.wProcessorArchitecture ) {
--- a/libpurple/protocols/jabber/win32/utsname.h Mon May 12 02:13:40 2008 +0000 +++ b/libpurple/protocols/jabber/win32/utsname.h Mon May 12 02:17:00 2008 +0000 @@ -14,7 +14,8 @@ char machine[20]; }; -int uname (struct utsname *); +int jabber_win32_uname (struct utsname *); +#define uname(utsname) jabber_win32_uname(utsname) #ifdef __cplusplus }