Ticket #26655: patch-configure.ac.diff
File patch-configure.ac.diff, 8.2 KB (added by dbevans (David B. Evans), 14 years ago) |
---|
-
configure.ac
old new 2989 2989 cat >>$outfile <<_______EOF 2990 2990 #define G_HAVE_GINT64 1 /* deprecated, always true */ 2991 2991 2992 ${glib_extension}typedef signed $gint64 gint64; 2993 ${glib_extension}typedef unsigned $gint64 guint64; 2992 #ifdef __LP64__ 2993 ${glib_extension}typedef signed long gint64; 2994 ${glib_extension}typedef unsigned long guint64; 2994 2995 2995 #define G_GINT64_CONSTANT(val) $gint64_constant 2996 #define G_GUINT64_CONSTANT(val) $guint64_constant 2996 #define G_GINT64_CONSTANT(val) (val##L) 2997 #define G_GUINT64_CONSTANT(val) (val##UL) 2998 #else 2999 ${glib_extension}typedef signed long long gint64; 3000 ${glib_extension}typedef unsigned long long guint64; 3001 3002 #define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) 3003 #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) 3004 #endif 2997 3005 _______EOF 2998 3006 2999 3007 if test x$gint64_format != x ; then 3000 3008 cat >>$outfile <<_______EOF 3001 #define G_GINT64_MODIFIER $gint64_modifier 3002 #define G_GINT64_FORMAT $gint64_format 3003 #define G_GUINT64_FORMAT $guint64_format 3009 #ifdef __LP64__ 3010 #define G_GINT64_MODIFIER "l" 3011 #define G_GINT64_FORMAT "li" 3012 #define G_GUINT64_FORMAT "lu" 3013 #else 3014 #define G_GINT64_MODIFIER "ll" 3015 #define G_GINT64_FORMAT "lli" 3016 #define G_GUINT64_FORMAT "llu" 3017 #endif 3004 3018 _______EOF 3005 3019 else 3006 3020 cat >>$outfile <<_______EOF … … 3012 3026 3013 3027 cat >>$outfile <<_______EOF 3014 3028 3015 #define GLIB_SIZEOF_VOID_P $glib_void_p 3016 #define GLIB_SIZEOF_LONG $glib_long 3017 #define GLIB_SIZEOF_SIZE_T $glib_size_t 3029 #ifdef __LP64__ 3030 #define GLIB_SIZEOF_VOID_P 8 3031 #define GLIB_SIZEOF_LONG 8 3032 #define GLIB_SIZEOF_SIZE_T 8 3033 #else 3034 #define GLIB_SIZEOF_VOID_P 4 3035 #define GLIB_SIZEOF_LONG 4 3036 #define GLIB_SIZEOF_SIZE_T 4 3037 #endif 3018 3038 3019 3039 _______EOF 3020 3040 … … 3042 3062 if test -z "$glib_unknown_void_p"; then 3043 3063 cat >>$outfile <<_______EOF 3044 3064 3045 #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p)) 3046 #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p)) 3065 #ifdef __LP64__ 3066 #define GPOINTER_TO_INT(p) ((gint) (glong) (p)) 3067 #define GPOINTER_TO_UINT(p) ((guint) (gulong) (p)) 3068 3069 #define GINT_TO_POINTER(i) ((gpointer) (glong) (i)) 3070 #define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u)) 3071 3072 typedef signed long gintptr; 3073 typedef unsigned long guintptr; 3074 3075 #define G_GINTPTR_MODIFIER "l" 3076 #define G_GINTPTR_FORMAT "li" 3077 #define G_GUINTPTR_FORMAT "lu" 3078 #else 3079 #define GPOINTER_TO_INT(p) ((gint) (p)) 3080 #define GPOINTER_TO_UINT(p) ((guint) (p)) 3047 3081 3048 #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast}(i))3049 #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast}(u))3082 #define GINT_TO_POINTER(i) ((gpointer) (i)) 3083 #define GUINT_TO_POINTER(u) ((gpointer) (u)) 3050 3084 3051 typedef signed $glib_intptr_type_definegintptr;3052 typedef unsigned $glib_intptr_type_defineguintptr;3085 typedef signed int gintptr; 3086 typedef unsigned int guintptr; 3053 3087 3054 #define G_GINTPTR_MODIFIER $gintptr_modifier 3055 #define G_GINTPTR_FORMAT $gintptr_format 3056 #define G_GUINTPTR_FORMAT $guintptr_format 3088 #define G_GINTPTR_MODIFIER "" 3089 #define G_GINTPTR_FORMAT "i" 3090 #define G_GUINTPTR_FORMAT "u" 3091 #endif 3057 3092 _______EOF 3058 3093 else 3059 3094 echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile … … 3169 3204 { 3170 3205 struct _GMutex *runtime_mutex; 3171 3206 union { 3172 char pad[[$g_mutex_sizeof]]; 3207 #ifdef __LP64__ 3208 char pad[[64]]; 3209 #else 3210 char pad[[44]]; 3211 #endif 3173 3212 double dummy_double; 3174 3213 void *dummy_pointer; 3175 3214 long dummy_long; 3176 3215 } static_mutex; 3177 3216 }; 3178 #define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } } 3217 #ifdef __LP64__ 3218 #ifdef __BIG_ENDIAN__ 3219 #define G_STATIC_MUTEX_INIT { NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } } 3220 #else 3221 #define G_STATIC_MUTEX_INIT { NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } } 3222 #endif 3223 #else 3224 #ifdef __BIG_ENDIAN__ 3225 #define G_STATIC_MUTEX_INIT { NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } } 3226 #else 3227 #define G_STATIC_MUTEX_INIT { NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } } 3228 #endif 3229 #endif 3179 3230 #define g_static_mutex_get_mutex(mutex) \\ 3180 3231 (g_thread_use_default_impl ? ((GMutex*)(gpointer) ((mutex)->static_mutex.pad)) : \\ 3181 3232 g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex))) … … 3199 3250 typedef union _GSystemThread GSystemThread; 3200 3251 union _GSystemThread 3201 3252 { 3202 char data[[$g_system_thread_sizeof]]; 3253 #ifdef __LP64__ 3254 char data[[8]]; 3255 #else 3256 char data[[4]]; 3257 #endif 3203 3258 double dummy_double; 3204 3259 void *dummy_pointer; 3205 3260 long dummy_long; … … 3207 3262 _______EOF 3208 3263 if test x"$g_memory_barrier_needed" != xno; then 3209 3264 echo >>$outfile 3265 echo "#ifdef __BIG_ENDIAN__" >>$outfile 3210 3266 echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile 3267 echo "#endif" >>$outfile 3211 3268 fi 3212 3269 3213 3270 echo >>$outfile 3214 3271 g_bit_sizes="16 32 64" 3215 3272 for bits in $g_bit_sizes; do 3216 3273 cat >>$outfile <<_______EOF 3217 #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val)) 3218 #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val)) 3219 #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val)) 3220 #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val)) 3274 #ifdef __BIG_ENDIAN__ 3275 #define GINT${bits}_TO_BE(val) ((gint${bits}) (val)) 3276 #define GUINT${bits}_TO_BE(val) ((guint${bits}) (val)) 3277 #define GINT${bits}_TO_LE(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val)) 3278 #define GUINT${bits}_TO_LE(val) (GUINT${bits}_SWAP_LE_BE (val)) 3279 #else 3280 #define GINT${bits}_TO_LE(val) ((gint${bits}) (val)) 3281 #define GUINT${bits}_TO_LE(val) ((guint${bits}) (val)) 3282 #define GINT${bits}_TO_BE(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val)) 3283 #define GUINT${bits}_TO_BE(val) (GUINT${bits}_SWAP_LE_BE (val)) 3284 #endif 3221 3285 _______EOF 3222 3286 done 3223 3287 3224 3288 cat >>$outfile <<_______EOF 3225 #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val)) 3226 #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val)) 3227 #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val)) 3228 #define GULONG_TO_BE(val) ((gulong) GUINT${glongbits}_TO_BE (val)) 3289 #ifdef __LP64__ 3290 #define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val)) 3291 #define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val)) 3292 #define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val)) 3293 #define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val)) 3294 #else 3295 #define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val)) 3296 #define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val)) 3297 #define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val)) 3298 #define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val)) 3299 #endif 3229 3300 #define GINT_TO_LE(val) ((gint) GINT${gintbits}_TO_LE (val)) 3230 3301 #define GUINT_TO_LE(val) ((guint) GUINT${gintbits}_TO_LE (val)) 3231 3302 #define GINT_TO_BE(val) ((gint) GINT${gintbits}_TO_BE (val)) 3232 3303 #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val)) 3233 #define GSIZE_TO_LE(val) ((gsize) GUINT${gsizebits}_TO_LE (val)) 3234 #define GSSIZE_TO_LE(val) ((gssize) GINT${gsizebits}_TO_LE (val)) 3235 #define GSIZE_TO_BE(val) ((gsize) GUINT${gsizebits}_TO_BE (val)) 3236 #define GSSIZE_TO_BE(val) ((gssize) GINT${gsizebits}_TO_BE (val)) 3237 #define G_BYTE_ORDER $g_byte_order 3304 #ifdef __LP64__ 3305 #define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val)) 3306 #define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val)) 3307 #define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val)) 3308 #define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val)) 3309 #else 3310 #define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val)) 3311 #define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val)) 3312 #define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val)) 3313 #define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val)) 3314 #endif 3315 #ifdef __BIG_ENDIAN__ 3316 #define G_BYTE_ORDER G_BIG_ENDIAN 3317 #else 3318 #define G_BYTE_ORDER G_LITTLE_ENDIAN 3319 #endif 3238 3320 3239 3321 #define GLIB_SYSDEF_POLLIN =$g_pollin 3240 3322 #define GLIB_SYSDEF_POLLOUT =$g_pollout … … 3519 3601 *) glib_vacopy='' 3520 3602 esac 3521 3603 3522 if test x$glib_cv_va_val_copy = xno; then3523 3604 glib_vacopy="\$glib_vacopy 3524 #define G_VA_COPY_AS_ARRAY 1" 3525 fi 3605 #ifdef __LP64__ 3606 #define G_VA_COPY_AS_ARRAY 1 3607 #endif" 3526 3608 3527 3609 if test x$glib_cv_hasinline = xyes; then 3528 3610 glib_inline='#define G_HAVE_INLINE 1'