pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/glib
Module Name: pkgsrc
Committed By: nia
Date: Tue Oct 1 10:56:41 UTC 2024
Modified Files:
pkgsrc/devel/glib: distinfo
pkgsrc/devel/glib/patches: patch-aj
Log Message:
glib: Remove old and crusty (i386-only) inline assembler.
It doesn't build with GCC 10 - let's just assume that GCC 10 knows
better about optimizing byte-swaps than this old code.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/devel/glib/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/glib/patches/patch-aj
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/glib/distinfo
diff -u pkgsrc/devel/glib/distinfo:1.26 pkgsrc/devel/glib/distinfo:1.27
--- pkgsrc/devel/glib/distinfo:1.26 Sat Mar 16 21:33:11 2024
+++ pkgsrc/devel/glib/distinfo Tue Oct 1 10:56:41 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2024/03/16 21:33:11 nia Exp $
+$NetBSD: distinfo,v 1.27 2024/10/01 10:56:41 nia Exp $
BLAKE2s (glib-1.2.10.tar.gz) = b574a1849bd9cfb337c83adfad9564c885057367d3ab0c7d8d8fda559607f076
SHA512 (glib-1.2.10.tar.gz) = 4452b741382194d4ca425f084fa60e1a9e30040ac2e839c9136047d0461cf4b1ebcc16aac4e65998d1b9329ead8f617966b3d09317a83634f14d556a7e14b7a8
@@ -12,4 +12,4 @@ SHA1 (patch-af) = 3e3caa294cc64dd13beb61
SHA1 (patch-ag) = efdff0d20a1c3280c9916405a8d89190c68b9604
SHA1 (patch-ah) = 1e6dec25db0c72601868bb0f7c465202ecead81b
SHA1 (patch-ai) = 6f6e5727bcb52655865b689c923601843d8d453d
-SHA1 (patch-aj) = 7d2668defb002571958b3fb3f38845bb59cd89cd
+SHA1 (patch-aj) = caeaf41aa275a9a3fb75773e61de83f24aeb3b57
Index: pkgsrc/devel/glib/patches/patch-aj
diff -u pkgsrc/devel/glib/patches/patch-aj:1.4 pkgsrc/devel/glib/patches/patch-aj:1.5
--- pkgsrc/devel/glib/patches/patch-aj:1.4 Tue Nov 18 17:59:02 2008
+++ pkgsrc/devel/glib/patches/patch-aj Tue Oct 1 10:56:41 2024
@@ -1,8 +1,8 @@
-$NetBSD: patch-aj,v 1.4 2008/11/18 17:59:02 chuck Exp $
+$NetBSD: patch-aj,v 1.5 2024/10/01 10:56:41 nia Exp $
---- glib.h.orig 2001-02-26 22:44:38.000000000 -0500
-+++ glib.h 2008-11-18 12:51:35.000000000 -0500
-@@ -119,8 +119,12 @@
+--- glib.h.orig 2001-02-27 03:44:38.000000000 +0000
++++ glib.h
+@@ -119,8 +119,12 @@ extern "C" {
* defined then the current definition is correct.
*/
#ifndef NULL
@@ -15,7 +15,7 @@ $NetBSD: patch-aj,v 1.4 2008/11/18 17:59
#ifndef FALSE
#define FALSE (0)
-@@ -204,7 +208,7 @@
+@@ -204,7 +208,7 @@ extern "C" {
#ifndef G_INLINE_FUNC
# ifdef __GNUC__
# ifdef __OPTIMIZE__
@@ -24,7 +24,7 @@ $NetBSD: patch-aj,v 1.4 2008/11/18 17:59
# else
# undef G_CAN_INLINE
# define G_INLINE_FUNC extern
-@@ -271,14 +275,18 @@
+@@ -271,14 +275,18 @@ extern "C" {
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
* macros, so we can refer to them as strings unconditionally.
@@ -46,3 +46,82 @@ $NetBSD: patch-aj,v 1.4 2008/11/18 17:59
/* we try to provide a usefull equivalent for ATEXIT if it is
* not defined, but use is actually abandoned. people should
+@@ -526,51 +534,8 @@ typedef gint32 GTime;
+ (((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \
+ (((guint32) (val) & (guint32) 0xff000000U) >> 24)))
+
+-/* Intel specific stuff for speed
+- */
+-#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
+-# define GUINT16_SWAP_LE_BE_X86(val) \
+- (__extension__ \
+- ({ register guint16 __v; \
+- if (__builtin_constant_p (val)) \
+- __v = GUINT16_SWAP_LE_BE_CONSTANT (val); \
+- else \
+- __asm__ __const__ ("rorw $8, %w0" \
+- : "=r" (__v) \
+- : "0" ((guint16) (val))); \
+- __v; }))
+-# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_X86 (val))
+-# if !defined(__i486__) && !defined(__i586__) \
+- && !defined(__pentium__) && !defined(__i686__) && !defined(__pentiumpro__)
+-# define GUINT32_SWAP_LE_BE_X86(val) \
+- (__extension__ \
+- ({ register guint32 __v; \
+- if (__builtin_constant_p (val)) \
+- __v = GUINT32_SWAP_LE_BE_CONSTANT (val); \
+- else \
+- __asm__ __const__ ("rorw $8, %w0\n\t" \
+- "rorl $16, %0\n\t" \
+- "rorw $8, %w0" \
+- : "=r" (__v) \
+- : "0" ((guint32) (val))); \
+- __v; }))
+-# else /* 486 and higher has bswap */
+-# define GUINT32_SWAP_LE_BE_X86(val) \
+- (__extension__ \
+- ({ register guint32 __v; \
+- if (__builtin_constant_p (val)) \
+- __v = GUINT32_SWAP_LE_BE_CONSTANT (val); \
+- else \
+- __asm__ __const__ ("bswap %0" \
+- : "=r" (__v) \
+- : "0" ((guint32) (val))); \
+- __v; }))
+-# endif /* processor specific 32-bit stuff */
+-# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86 (val))
+-#else /* !__i386__ */
+ # define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
+ # define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val))
+-#endif /* __i386__ */
+
+ #ifdef G_HAVE_GINT64
+ # define GUINT64_SWAP_LE_BE_CONSTANT(val) ((guint64) ( \
+@@ -590,26 +555,7 @@ typedef gint32 GTime;
+ (guint64) G_GINT64_CONSTANT(0x00ff000000000000U)) >> 40) | \
+ (((guint64) (val) & \
+ (guint64) G_GINT64_CONSTANT(0xff00000000000000U)) >> 56)))
+-# if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
+-# define GUINT64_SWAP_LE_BE_X86(val) \
+- (__extension__ \
+- ({ union { guint64 __ll; \
+- guint32 __l[2]; } __r; \
+- if (__builtin_constant_p (val)) \
+- __r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (val); \
+- else \
+- { \
+- union { guint64 __ll; \
+- guint32 __l[2]; } __w; \
+- __w.__ll = ((guint64) val); \
+- __r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]); \
+- __r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]); \
+- } \
+- __r.__ll; }))
+-# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86 (val))
+-# else /* !__i386__ */
+ # define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT(val))
+-# endif
+ #endif
+
+ #define GUINT16_SWAP_LE_PDP(val) ((guint16) (val))
Home |
Main Index |
Thread Index |
Old Index