Ticket #15816: patch-configure.diff

File patch-configure.diff, 4.8 KB (added by jjdanimoth@…, 16 years ago)

Configure patch for glib2 that remove the problem

  • configure

    old new  
    3181831818fi
    3181931819{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
    3182031820$as_echo "$ac_cv_c_bigendian" >&6; }
    31821  case $ac_cv_c_bigendian in #(
    31822    yes)
    3182331821     cat >>confdefs.h <<\_ACEOF
     31822#ifdef __ppc__
    3182431823#define WORDS_BIGENDIAN 1
     31824#endif
    3182531825_ACEOF
    31826 ;; #(
    31827    no)
    31828       ;; #(
    31829    universal)
    31830       ;; #(
    31831    *)
    31832      { { $as_echo "$as_me:$LINENO: error: unknown endianness
    31833  presetting ac_cv_c_bigendian=no (or yes) will help" >&5
    31834 $as_echo "$as_me: error: unknown endianness
    31835  presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
    31836    { (exit 1); exit 1; }; } ;;
    31837  esac
    3183831826
    3183931827
    3184031828# check for header files
     
    4277042758$as_echo "$glib_cv_byte_contents_gmutex" >&6; }
    4277142759
    4277242760cat >>confdefs.h <<_ACEOF
    42773 #define GLIB_BYTE_CONTENTS_GMUTEX $glib_cv_byte_contents_gmutex
     42761#ifdef __ppc__
     42762#define GLIB_BYTE_CONTENTS_GMUTEX 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
     42763#else
     42764#define GLIB_BYTE_CONTENTS_GMUTEX -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
     42765#endif
    4277442766_ACEOF
    4277542767
    4277642768
     
    4826548257_______EOF
    4826648258        fi
    4826748259
    48268         case x$g_stack_grows in
    48269         xyes) echo "#define G_HAVE_GROWING_STACK 1" >>$outfile ;;
    48270         *)    echo "#define G_HAVE_GROWING_STACK 0" >>$outfile ;;
    48271         esac
     48260        cat >>$outfile <<_______EOF
     48261#ifdef __ppc__
     48262#define G_HAVE_GROWING_STACK 1
     48263#else
     48264#define G_HAVE_GROWING_STACK 0
     48265#endif
     48266_______EOF
    4827248267
    4827348268
    4827448269        echo >>$outfile
     
    4831748312    long   dummy_long;
    4831848313  } static_mutex;
    4831948314};
    48320 #define G_STATIC_MUTEX_INIT     { NULL, { { $g_mutex_contents} } }
     48315#ifdef __ppc__
     48316#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} } }
     48317#else           
     48318#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} } }
     48319#endif
     48320
    4832148321#define g_static_mutex_get_mutex(mutex) \\
    4832248322  (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
    4832348323   g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
     
    4834648346  void  *dummy_pointer;
    4834748347  long   dummy_long;
    4834848348};
    48349 _______EOF
    48350         if test x"$g_memory_barrier_needed" != xno; then
    48351           echo >>$outfile
    48352           echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
    48353         fi
     48349#ifdef __ppc__
     48350#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1
     48351#define GINT16_TO_BE(val)       ((gint16) (val))
     48352#define GUINT16_TO_BE(val)      ((guint16) (val))
     48353#define GINT16_TO_LE(val)       ((gint16) GUINT16_SWAP_LE_BE (val))
     48354#define GUINT16_TO_LE(val)      (GUINT16_SWAP_LE_BE (val))
     48355#define GINT32_TO_BE(val)       ((gint32) (val))
     48356#define GUINT32_TO_BE(val)      ((guint32) (val))
     48357#define GINT32_TO_LE(val)       ((gint32) GUINT32_SWAP_LE_BE (val))
     48358#define GUINT32_TO_LE(val)      (GUINT32_SWAP_LE_BE (val))
     48359#define GINT64_TO_BE(val)       ((gint64) (val))
     48360#define GUINT64_TO_BE(val)      ((guint64) (val))
     48361#define GINT64_TO_LE(val)       ((gint64) GUINT64_SWAP_LE_BE (val))
     48362#define GUINT64_TO_LE(val)      (GUINT64_SWAP_LE_BE (val))
     48363
     48364#else
     48365
     48366#define GINT16_TO_LE(val)       ((gint16) (val))
     48367#define GUINT16_TO_LE(val)      ((guint16) (val))
     48368#define GINT16_TO_BE(val)       ((gint16) GUINT16_SWAP_LE_BE (val))
     48369#define GUINT16_TO_BE(val)      (GUINT16_SWAP_LE_BE (val))
     48370#define GINT32_TO_LE(val)       ((gint32) (val))
     48371#define GUINT32_TO_LE(val)      ((guint32) (val))
     48372#define GINT32_TO_BE(val)       ((gint32) GUINT32_SWAP_LE_BE (val))
     48373#define GUINT32_TO_BE(val)      (GUINT32_SWAP_LE_BE (val))
     48374#define GINT64_TO_LE(val)       ((gint64) (val))
     48375#define GUINT64_TO_LE(val)      ((guint64) (val))
     48376#define GINT64_TO_BE(val)       ((gint64) GUINT64_SWAP_LE_BE (val))
     48377#define GUINT64_TO_BE(val)      (GUINT64_SWAP_LE_BE (val))
     48378
     48379#endif
    4835448380
    48355         echo >>$outfile
    48356         g_bit_sizes="16 32 64"
    48357         for bits in $g_bit_sizes; do
    48358           cat >>$outfile <<_______EOF
    48359 #define GINT${bits}_TO_${g_bs_native}(val)      ((gint${bits}) (val))
    48360 #define GUINT${bits}_TO_${g_bs_native}(val)     ((guint${bits}) (val))
    48361 #define GINT${bits}_TO_${g_bs_alien}(val)       ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
    48362 #define GUINT${bits}_TO_${g_bs_alien}(val)      (GUINT${bits}_SWAP_LE_BE (val))
    48363 _______EOF
    48364         done
    4836548381
    48366         cat >>$outfile <<_______EOF
    4836748382#define GLONG_TO_LE(val)        ((glong) GINT${glongbits}_TO_LE (val))
    4836848383#define GULONG_TO_LE(val)       ((gulong) GUINT${glongbits}_TO_LE (val))
    4836948384#define GLONG_TO_BE(val)        ((glong) GINT${glongbits}_TO_BE (val))
     
    4837248387#define GUINT_TO_LE(val)        ((guint) GUINT${gintbits}_TO_LE (val))
    4837348388#define GINT_TO_BE(val)         ((gint) GINT${gintbits}_TO_BE (val))
    4837448389#define GUINT_TO_BE(val)        ((guint) GUINT${gintbits}_TO_BE (val))
    48375 #define G_BYTE_ORDER $g_byte_order
     48390#ifdef __ppc__
     48391#define G_BYTE_ORDER G_BIG_ENDIAN
     48392#else
     48393#define G_BYTE_ORDER G_LITTLE_ENDIAN
     48394#endif
    4837648395
    4837748396#define GLIB_SYSDEF_POLLIN =$g_pollin
    4837848397#define GLIB_SYSDEF_POLLOUT =$g_pollout