[xiph-cvs] cvs commit: ogg/include/ogg os_types.h

Ralph Giles giles at xiph.org
Sun Mar 14 09:26:28 PST 2004



giles       04/03/14 12:26:28

  Modified:    include/ogg os_types.h
  Log:
  Add platform-specific int types for MingW32. After a patch from John Edwards.
  
  Jan posted a different patch:
  
    http://www.xiph.org/archives/vorbis-dev/200402/0039.html
  
  Most everyone (but MSVC) ships stdint types in either stdint.h or inttypes.h these days, but there
  can be some tricky collisions with older installations, so I'd rather avoid a new portability
  refinement tail this close to release.

Revision  Changes    Path
1.15      +22 -16    ogg/include/ogg/os_types.h

Index: os_types.h
===================================================================
RCS file: /usr/local/cvsroot/ogg/include/ogg/os_types.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- a/os_types.h	2 Sep 2003 05:09:14 -0000	1.14
+++ b/os_types.h	14 Mar 2004 17:26:27 -0000	1.15
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os_types.h,v 1.14 2003/09/02 05:09:14 xiphmont Exp $
+ last mod: $Id: os_types.h,v 1.15 2004/03/14 17:26:27 giles Exp $
 
  ********************************************************************/
 #ifndef _OS_TYPES_H
@@ -24,23 +24,29 @@
 #define _ogg_realloc realloc
 #define _ogg_free    free
 
-#ifdef _WIN32 
+#if defined(_WIN32) 
 
-#  ifndef __GNUC__
-   /* MSVC/Borland */
-   typedef __int64 ogg_int64_t;
-   typedef __int32 ogg_int32_t;
-   typedef unsigned __int32 ogg_uint32_t;
-   typedef __int16 ogg_int16_t;
-   typedef unsigned __int16 ogg_uint16_t;
+#  if defined(__CYGWIN__)
+#    include <_G_config.h>
+     typedef _G_int64_t ogg_int64_t;
+     typedef _G_int32_t ogg_int32_t;
+     typedef _G_uint32_t ogg_uint32_t;
+     typedef _G_int16_t ogg_int16_t;
+     typedef _G_uint16_t ogg_uint16_t;
+#  if defined(__MINGW32__)
+     typedef short ogg_int16_t;                                                                             
+     typedef unsigned short ogg_uint16_t;                                                                   
+     typedef int ogg_int32_t;                                                                               
+     typedef unsigned int ogg_uint32_t;                                                                     
+     typedef long long ogg_int64_t;                                                                         
+     typedef unsigned long long ogg_uint64_t;  
 #  else
-   /* Cygwin */
-   #include <_G_config.h>
-   typedef _G_int64_t ogg_int64_t;
-   typedef _G_int32_t ogg_int32_t;
-   typedef _G_uint32_t ogg_uint32_t;
-   typedef _G_int16_t ogg_int16_t;
-   typedef _G_uint16_t ogg_uint16_t;
+     /* MSVC/Borland */
+     typedef __int64 ogg_int64_t;
+     typedef __int32 ogg_int32_t;
+     typedef unsigned __int32 ogg_uint32_t;
+     typedef __int16 ogg_int16_t;
+     typedef unsigned __int16 ogg_uint16_t;
 #  endif
 
 #elif defined(__MACOS__)

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list