Re: [AD] windows compile

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2006-06-15, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> >>> MSVC doesn't like uint64_t?
> >>>
> >>
> >> Looks like it.  I guess an MSVC-specific #define uint64_t <whatever>
> >> needs to be added to include/allegro/platform/almsvc.h
> >> (not include/allegro/platform/astdint.h).
> >>
> The attached patch does just that. Tested on MSVC6 and MSVC8. The
> build is then successful for both.

I'm committing the attached patch instead.  LONG_LONG was already
conditionally #defined for platforms that supported 64-bit integers.

I'm not sure I like that compilers without 64-bit integers are locked
out of the API by file_size_ex.  What's the policy on this?

Although, src/mixer.c has been unconditionally using LONG_LONG since
2004-07-11.  I'm not sure if that's an oversight, but no one seems to
have complained since then.

Peter

--- allegro/internal/alconfig.h (revision 7354)
+++ allegro/internal/alconfig.h (local)
@@ -109,6 +109,10 @@

    #ifndef LONG_LONG
       #define LONG_LONG       long long
+      #ifdef ALLEGRO_GUESS_INTTYPES_OK
+         #define int64_t      signed long long
+         #define uint64_t     unsigned long long
+      #endif
    #endif

    #ifdef __i386__
--- allegro/platform/albcc32.h  (revision 7354)
+++ allegro/platform/albcc32.h  (local)
@@ -69,6 +69,8 @@
 #define INLINE       __inline

 #define LONG_LONG    __int64
+#define int64_t      signed __int64
+#define uint64_t     unsigned __int64

 #define AL_CONST     const

--- allegro/platform/almsvc.h   (revision 7354)
+++ allegro/platform/almsvc.h   (local)
@@ -76,6 +76,8 @@
 #define INLINE       __inline

 #define LONG_LONG    __int64
+#define int64_t      signed __int64
+#define uint64_t     unsigned __int64

 #define AL_CONST     const

--- allegro/platform/alwatcom.h (revision 7354)
+++ allegro/platform/alwatcom.h (local)
@@ -56,6 +56,10 @@
 #define ALLEGRO_LFN  0

 #define LONG_LONG    long long
+#ifdef ALLEGRO_GUESS_INTTYPES_OK
+   #define int64_t   signed long long
+   #define uint64_t  unsigned long long
+#endif

 #if __WATCOMC__ >= 1100
    #define ALLEGRO_MMX







Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/