Hello community, here is the log from the commit of package popt for openSUSE:Factory checked in at 2013-10-08 11:05:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/popt (Old) and /work/SRC/openSUSE:Factory/.popt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "popt" Changes: -------- --- /work/SRC/openSUSE:Factory/popt/popt.changes 2013-07-11 13:31:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.popt.new/popt.changes 2013-10-08 11:05:09.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Oct 7 14:25:32 UTC 2013 - sch...@suse.de + +- popt-alignment-checks.patch: fix alignment checks + +------------------------------------------------------------------- New: ---- popt-alignment-checks.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ popt.spec ++++++ --- /var/tmp/diff_new_pack.fx2kMp/_old 2013-10-08 11:05:10.000000000 +0200 +++ /var/tmp/diff_new_pack.fx2kMp/_new 2013-10-08 11:05:10.000000000 +0200 @@ -32,6 +32,7 @@ BuildRequires: pkgconfig BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: popt-libc-updates.patch +Patch1: popt-alignment-checks.patch %description Popt is a C library for parsing command line parameters. Popt was @@ -71,6 +72,7 @@ %prep %setup -q %patch0 +%patch1 -p1 %build autoreconf -fiv ++++++ popt-alignment-checks.patch ++++++ Index: popt-1.16/configure.ac =================================================================== --- popt-1.16.orig/configure.ac +++ popt-1.16/configure.ac @@ -47,7 +47,7 @@ AC_SYS_LARGEFILE AC_ISC_POSIX -AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h) +AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h stdalign.h) # For some systems we know that we have ld_version scripts. # Use it then as default. Index: popt-1.16/popt.c =================================================================== --- popt-1.16.orig/popt.c +++ popt-1.16/popt.c @@ -25,6 +25,15 @@ extern long long int strtoll(const char #include "poptint.h" +#ifdef HAVE_STDALIGN_H +#include <stdalign.h> +#define ALIGNOF(x) alignof(x) +#elif defined __GNUC__ +#define ALIGNOF(x) __alignof__(x) +#else +#define ALIGNOF(x) sizeof(x) +#endif + #ifdef MYDEBUG /*@unchecked@*/ int _popt_debug = 0; @@ -977,12 +986,8 @@ static unsigned int seed = 0; int poptSaveLongLong(long long * arg, unsigned int argInfo, long long aLongLong) { - if (arg == NULL -#ifdef NOTYET /* XXX Check alignment, may fail on funky platforms. */ - || (((unsigned long long)arg) & (sizeof(*arg)-1)) -#endif - ) + if (arg == NULL || (((unsigned long)arg) & (ALIGNOF(*arg)-1))) return POPT_ERROR_NULLARG; if (aLongLong != 0 && LF_ISSET(RANDOM)) { @@ -1023,7 +1028,7 @@ int poptSaveLongLong(long long * arg, un int poptSaveLong(long * arg, unsigned int argInfo, long aLong) { /* XXX Check alignment, may fail on funky platforms. */ - if (arg == NULL || (((unsigned long)arg) & (sizeof(*arg)-1))) + if (arg == NULL || (((unsigned long)arg) & (ALIGNOF(*arg)-1))) return POPT_ERROR_NULLARG; if (aLong != 0 && LF_ISSET(RANDOM)) { @@ -1056,7 +1061,7 @@ int poptSaveLong(long * arg, unsigned in int poptSaveInt(/*@null@*/ int * arg, unsigned int argInfo, long aLong) { /* XXX Check alignment, may fail on funky platforms. */ - if (arg == NULL || (((unsigned long)arg) & (sizeof(*arg)-1))) + if (arg == NULL || (((unsigned long)arg) & (ALIGNOF(*arg)-1))) return POPT_ERROR_NULLARG; if (aLong != 0 && LF_ISSET(RANDOM)) { @@ -1089,7 +1094,7 @@ int poptSaveInt(/*@null@*/ int * arg, un int poptSaveShort(/*@null@*/ short * arg, unsigned int argInfo, long aLong) { /* XXX Check alignment, may fail on funky platforms. */ - if (arg == NULL || (((unsigned long)arg) & (sizeof(*arg)-1))) + if (arg == NULL || (((unsigned long)arg) & (ALIGNOF(*arg)-1))) return POPT_ERROR_NULLARG; if (aLong != 0 && LF_ISSET(RANDOM)) { -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org