Hello community, here is the log from the commit of package libHX for openSUSE:Factory checked in at 2013-11-24 12:05:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libHX (Old) and /work/SRC/openSUSE:Factory/.libHX.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libHX" Changes: -------- --- /work/SRC/openSUSE:Factory/libHX/libHX.changes 2013-10-07 09:42:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libHX.new/libHX.changes 2013-11-24 12:05:59.000000000 +0100 @@ -1,0 +2,6 @@ +Sat Nov 16 04:08:25 UTC 2013 - jeng...@inai.de + +- Update to new upstream release 3.17 +* Build fixes and improvements for compiling under Windows + +------------------------------------------------------------------- Old: ---- libHX-3.16.tar.xz libHX-3.16.tar.xz.asc New: ---- libHX-3.17.tar.xz libHX-3.17.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libHX.spec ++++++ --- /var/tmp/diff_new_pack.RNmdLM/_old 2013-11-24 12:06:00.000000000 +0100 +++ /var/tmp/diff_new_pack.RNmdLM/_new 2013-11-24 12:06:00.000000000 +0100 @@ -21,7 +21,7 @@ Summary: Useful collection of routines for C and C++ programming License: LGPL-2.1 or LGPL-3.0 Group: Development/Libraries/C and C++ -Version: 3.16 +Version: 3.17 Release: 0 Url: http://libhx.sf.net/ @@ -115,13 +115,14 @@ %install b="%buildroot"; -make install DESTDIR="$b" docdir="%_defaultdocdir/%name"; -install -pm0644 doc/* "$b/%_defaultdocdir/%name"; -rm -f "$b/%_defaultdocdir/%name"/Makefile*; +make install DESTDIR="$b" docdir="%_docdir/%name" +mkdir -p "$b/%_docdir/%name" +install -pm0644 doc/* "$b/%_docdir/%name" +rm -f "$b/%_docdir/%name"/Makefile* find "$b/%_libdir" -type f -name "*.la" -delete; %check -make check +make check %{?_smp_mflags} %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig ++++++ libHX-3.16.tar.xz -> libHX-3.17.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/Makefile.in new/libHX-3.17/Makefile.in --- old/libHX-3.16/Makefile.in 2013-09-29 21:58:49.000000000 +0200 +++ new/libHX-3.17/Makefile.in 2013-11-16 05:17:43.000000000 +0100 @@ -221,6 +221,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LYX = @LYX@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/assorted/Makefile.in new/libHX-3.17/assorted/Makefile.in --- old/libHX-3.16/assorted/Makefile.in 2013-09-29 21:58:50.000000000 +0200 +++ new/libHX-3.17/assorted/Makefile.in 2013-11-16 05:17:43.000000000 +0100 @@ -153,6 +153,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LYX = @LYX@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/configure new/libHX-3.17/configure --- old/libHX-3.16/configure 2013-09-29 21:58:40.000000000 +0200 +++ new/libHX-3.17/configure 2013-11-16 05:17:41.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libHX 3.16. +# Generated by GNU Autoconf 2.69 for libHX 3.17. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libHX' PACKAGE_TARNAME='libhx' -PACKAGE_VERSION='3.16' -PACKAGE_STRING='libHX 3.16' +PACKAGE_VERSION='3.17' +PACKAGE_STRING='libHX 3.17' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -635,6 +635,9 @@ regular_CXXFLAGS regular_CFLAGS regular_CPPFLAGS +BUILD_DOCS_FALSE +BUILD_DOCS_TRUE +LYX B_PROC_FALSE B_PROC_TRUE libsocket_LIBS @@ -1334,7 +1337,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libHX 3.16 to adapt to many kinds of systems. +\`configure' configures libHX 3.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1407,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libHX 3.16:";; + short | recursive ) echo "Configuration of libHX 3.17:";; esac cat <<\_ACEOF @@ -1514,7 +1517,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libHX configure 3.16 +libHX configure 3.17 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2240,7 +2243,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libHX $as_me 3.16, which was +It was created by libHX $as_me 3.17, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3067,7 +3070,7 @@ # Define the identity of the package. PACKAGE='libhx' - VERSION='3.16' + VERSION='3.17' cat >>confdefs.h <<_ACEOF @@ -15918,6 +15921,7 @@ fi +# glibc < 2.17 has it in librt, mingw-w64 has it in libpthread { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : @@ -15942,7 +15946,7 @@ return 0; } _ACEOF -for ac_lib in '' rt; do +for ac_lib in '' rt pthread; do if test -z "$ac_lib"; then ac_res="none required" else @@ -16032,6 +16036,8 @@ fi + +libsocket_ok=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if ${ac_cv_search_getaddrinfo+:} false; then : @@ -16085,11 +16091,11 @@ ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - libsocket_LIBS="$LIBS"; LIBS="$LIBS_system" + libsocket_LIBS="$LIBS"; LIBS="$LIBS_system"; libsocket_ok=1 fi -if test -z "$libsocket_LIBS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-standard libraries containing getaddrinfo" >&5 +if test $libsocket_ok = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-standard libraries containing getaddrinfo" >&5 $as_echo_n "checking non-standard libraries containing getaddrinfo... " >&6; } LIBS="$LIBS_system -lws2_32"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16431,6 +16437,57 @@ fi +for ac_prog in lyx +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LYX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LYX"; then + ac_cv_prog_LYX="$LYX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LYX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LYX=$ac_cv_prog_LYX +if test -n "$LYX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LYX" >&5 +$as_echo "$LYX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LYX" && break +done + + if test -n "$LYX"; then + BUILD_DOCS_TRUE= + BUILD_DOCS_FALSE='#' +else + BUILD_DOCS_TRUE='#' + BUILD_DOCS_FALSE= +fi + + regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ @@ -16595,6 +16652,10 @@ as_fn_error $? "conditional \"B_PROC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -16992,7 +17053,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libHX $as_me 3.16, which was +This file was extended by libHX $as_me 3.17, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17058,7 +17119,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libHX config.status 3.16 +libHX config.status 3.17 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/configure.ac new/libHX-3.17/configure.ac --- old/libHX-3.16/configure.ac 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/configure.ac 2013-11-16 05:12:41.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libHX], [3.16]) +AC_INIT([libHX], [3.17]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -46,12 +46,22 @@ AM_CONDITIONAL([HAVE_DLFCN_H], [test "$ac_cv_header_dlfcn_h" = "yes"]) AC_SEARCH_LIBS([dlopen], [dl], [libdl_LIBS="$LIBS"; LIBS="$LIBS_system"]) AC_SUBST([libdl_LIBS]) -AC_SEARCH_LIBS([clock_gettime], [rt], [librt_LIBS="$LIBS"; LIBS="$LIBS_system"]) +# glibc < 2.17 has it in librt, mingw-w64 has it in libpthread +AC_SEARCH_LIBS([clock_gettime], [rt pthread], [librt_LIBS="$LIBS"; LIBS="$LIBS_system"]) AC_SUBST([librt_LIBS]) AC_SEARCH_LIBS([pthread_mutex_lock], [pthread], [libpthread_LIBS="$LIBS"; LIBS="$LIBS_system"]) AC_SUBST([libpthread_LIBS]) -AC_SEARCH_LIBS([getaddrinfo], [socket], [libsocket_LIBS="$LIBS"; LIBS="$LIBS_system"], []) -if test -z "$libsocket_LIBS"; then + +libsocket_ok=0 +AC_SEARCH_LIBS([getaddrinfo], [socket], + [libsocket_LIBS="$LIBS"; LIBS="$LIBS_system"; libsocket_ok=1], []) +if test $libsocket_ok = 0; then + dnl socket: Need to distinguish between "none required" and + dnl "no"(ne found), and only in the latter case try ws2_32. + dnl + dnl AC_SEARCH_LIBS is too dumb, we really need the ws2tcpip + dnl include to get a functional prototype (which is stdcall, sadly) + dnl for successful linking. AC_MSG_CHECKING([non-standard libraries containing getaddrinfo]) LIBS="$LIBS_system -lws2_32"; AC_LINK_IFELSE([AC_LANG_SOURCE([ @@ -95,6 +105,9 @@ AC_CHECK_FUNCS([getegid geteuid getpid getppid]) AM_CONDITIONAL([B_PROC], [test "$b_proc" = 1]) +AC_CHECK_PROGS([LYX], [lyx]) +AM_CONDITIONAL([BUILD_DOCS], [test -n "$LYX"]) + regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/doc/Makefile.am new/libHX-3.17/doc/Makefile.am --- old/libHX-3.16/doc/Makefile.am 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/doc/Makefile.am 2013-11-16 05:12:41.000000000 +0100 @@ -1,6 +1,8 @@ # -*- Makefile -*- +if BUILD_DOCS dist_doc_DATA = libHX_Documentation.pdf +endif libHX_Documentation.pdf: libHX_Documentation.lyx srcdir="${srcdir}" ${srcdir}/generate; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/doc/Makefile.in new/libHX-3.17/doc/Makefile.in --- old/libHX-3.16/doc/Makefile.in 2013-09-29 21:58:50.000000000 +0200 +++ new/libHX-3.17/doc/Makefile.in 2013-11-16 05:17:43.000000000 +0100 @@ -53,7 +53,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \ +DIST_COMMON = $(am__dist_doc_DATA_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcc4_visibility.m4 \ @@ -79,6 +79,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__dist_doc_DATA_DIST = libHX_Documentation.pdf am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -152,6 +153,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LYX = @LYX@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -236,7 +238,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -dist_doc_DATA = libHX_Documentation.pdf +@BUILD_DOCS_TRUE@dist_doc_DATA = libHX_Documentation.pdf EXTRA_DIST = libHX_Documentation.lyx api.txt changelog.txt all: all-am diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/doc/api.txt new/libHX-3.17/doc/api.txt --- old/libHX-3.16/doc/api.txt 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/doc/api.txt 2013-11-16 05:12:41.000000000 +0100 @@ -15,6 +15,8 @@ RMV MinVer FirstA Name ---------------------------------------------------------------------- +3.17 3.17 3.17 HX_LONGLONG_FMT +3.17 3.17 3.17 HX_SIZET_FMT 3.16 3.16 3.16 container_of 3.16 3.16 3.16 wxCDF 3.16 3.16 3.16 wxDSPAN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/doc/changelog.txt new/libHX-3.17/doc/changelog.txt --- old/libHX-3.16/doc/changelog.txt 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/doc/changelog.txt 2013-11-16 05:12:41.000000000 +0100 @@ -4,6 +4,15 @@ ==== +v3.17 (2013-11-16) +================== +Enhancements: +- defs: add HX_SIZET_FMT and HX_LONGLONG_FMT +- support for Win64 +Fixes: +- compile warnings on mingw were addressed + + v3.16 (2013-09-29) ================== Enhancements: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/doc/libHX_Documentation.lyx new/libHX-3.17/doc/libHX_Documentation.lyx --- old/libHX-3.16/doc/libHX_Documentation.lyx 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/doc/libHX_Documentation.lyx 2013-11-16 05:12:41.000000000 +0100 @@ -74,7 +74,7 @@ \begin_body \begin_layout Title -libHX 3.16 +libHX 3.17 \begin_inset Newline newline \end_inset @@ -3269,6 +3269,131 @@ . \end_layout +\begin_layout Subsection +VC runtime format specifiers +\end_layout + +\begin_layout Standard +The Microsoft Visual C runtime (a weak libc) uses non-standard format specifiers + for certain types. + Whereas C99 specifies +\begin_inset Quotes eld +\end_inset + +z +\begin_inset Quotes erd +\end_inset + + for +\family typewriter +size_t +\family default + and +\begin_inset Quotes eld +\end_inset + +ll +\begin_inset Quotes erd +\end_inset + + for long long, MSVCRT users must use +\begin_inset Quotes eld +\end_inset + +I +\begin_inset Quotes erd +\end_inset + + and +\begin_inset Quotes eld +\end_inset + +I64 +\begin_inset Quotes erd +\end_inset + + (forming +\family typewriter +%Id +\family default + instead of +\family typewriter +%zd +\family default + for +\family typewriter +ssize_t +\family default +, for example). + libHX provides two convenience macros for this: +\end_layout + +\begin_layout LyX-Code + +\series bold +#define +\series default + HX_SIZET_FMT "z" +\family roman +\shape italic + or +\family default +\shape default +"I" +\begin_inset Index idx +status open + +\begin_layout Plain Layout +HX_SIZET_FMT +\end_layout + +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\series bold +#define +\series default + HX_LONGLONG_FMT "ll" +\family roman +\shape italic + or +\family default +\shape default +"I64" +\begin_inset Index idx +status open + +\begin_layout Plain Layout +HX_LONGLONG_FMT +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +These may be used together with printf or scanf: +\end_layout + +\begin_layout LyX-Code +printf("struct timespec is of size %" HX_SIZET_FMT "u +\backslash +n", +\begin_inset Newline newline +\end_inset + + +\series bold +sizeof +\series default +(struct timespec)); +\end_layout + \begin_layout Standard \begin_inset Newpage clearpage \end_inset Files old/libHX-3.16/doc/libHX_Documentation.pdf and new/libHX-3.17/doc/libHX_Documentation.pdf differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/include/Makefile.in new/libHX-3.17/include/Makefile.in --- old/libHX-3.16/include/Makefile.in 2013-09-29 21:58:51.000000000 +0200 +++ new/libHX-3.17/include/Makefile.in 2013-11-16 05:17:43.000000000 +0100 @@ -154,6 +154,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LYX = @LYX@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/include/libHX/defs.h new/libHX-3.17/include/libHX/defs.h --- old/libHX-3.16/include/libHX/defs.h 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/include/libHX/defs.h 2013-11-16 05:12:41.000000000 +0100 @@ -216,4 +216,15 @@ # define container_of(v, s, m) containerof((v), s, m) #endif +#ifdef _WIN32 + /* + * Sufficiently old versions of the VC runtime do not even support %ll. + */ +# define HX_LONGLONG_FMT "I64" +# define HX_SIZET_FMT "I" +#else +# define HX_LONGLONG_FMT "ll" +# define HX_SIZET_FMT "z" +#endif + #endif /* _LIBHX_DEFS_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/libHX.pc.in new/libHX-3.17/libHX.pc.in --- old/libHX-3.16/libHX.pc.in 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/libHX.pc.in 2013-11-16 05:12:41.000000000 +0100 @@ -9,4 +9,4 @@ Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lHX -Libs.private: -ldl -lpthread -lrt +Libs.private: @libdl_LIBS@ @libpthread_LIBS@ @librt_LIBS@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/Makefile.am new/libHX-3.17/src/Makefile.am --- old/libHX-3.16/src/Makefile.am 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/Makefile.am 2013-11-16 05:12:41.000000000 +0100 @@ -13,7 +13,7 @@ mc.c misc.c opt.c \ rand.c string.c time.c libHX_la_LIBADD = ${libdl_LIBS} ${libpthread_LIBS} ${librt_LIBS} -libHX_la_LDFLAGS = -version-info 30:0:2 \ +libHX_la_LDFLAGS = -no-undefined -version-info 30:0:2 \ -Wl,--version-script=${srcdir}/libHX.map libHX_la_DEPENDENCIES = libHX.map @@ -26,7 +26,7 @@ libHX_rtcheck_la_SOURCES = rtcheck.c libHX_rtcheck_la_LIBADD = ${libdl_LIBS} -libHX_rtcheck_la_LDFLAGS = -avoid-version -module \ +libHX_rtcheck_la_LDFLAGS = -no-undefined -avoid-version -module \ -Wl,--version-script=${srcdir}/libHX.map EXTRA_DIST = internal.h map_int.h libHX.map @@ -36,7 +36,7 @@ tc-option tc-proc tc-rand tc-realpath \ tc-shconfig tc-strchr2 tc-string tc-strquote tc-time TESTS = tc-strchr2 tc-strquote -tc_cast_CFLAGS = ${AM_CFLAGS} -std=c99 +tc_cast_CFLAGS = ${AM_CFLAGS} -std=gnu99 tc_cast_LDADD = libHX.la -lm tc_compile_LDADD = libHX.la tc_dir_LDADD = libHX.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/Makefile.in new/libHX-3.17/src/Makefile.in --- old/libHX-3.16/src/Makefile.in 2013-09-29 21:58:51.000000000 +0200 +++ new/libHX-3.17/src/Makefile.in 2013-11-16 05:17:43.000000000 +0100 @@ -400,6 +400,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LYX = @LYX@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -491,17 +492,17 @@ libHX_la_SOURCES = deque.c dl.c format.c io.c map.c mc.c misc.c opt.c \ rand.c string.c time.c $(am__append_2) $(am__append_3) libHX_la_LIBADD = ${libdl_LIBS} ${libpthread_LIBS} ${librt_LIBS} -libHX_la_LDFLAGS = -version-info 30:0:2 \ +libHX_la_LDFLAGS = -no-undefined -version-info 30:0:2 \ -Wl,--version-script=${srcdir}/libHX.map libHX_la_DEPENDENCIES = libHX.map libHX_rtcheck_la_SOURCES = rtcheck.c libHX_rtcheck_la_LIBADD = ${libdl_LIBS} -libHX_rtcheck_la_LDFLAGS = -avoid-version -module \ +libHX_rtcheck_la_LDFLAGS = -no-undefined -avoid-version -module \ -Wl,--version-script=${srcdir}/libHX.map EXTRA_DIST = internal.h map_int.h libHX.map -tc_cast_CFLAGS = ${AM_CFLAGS} -std=c99 +tc_cast_CFLAGS = ${AM_CFLAGS} -std=gnu99 tc_cast_LDADD = libHX.la -lm tc_compile_LDADD = libHX.la tc_dir_LDADD = libHX.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/format.c new/libHX-3.17/src/format.c --- old/libHX-3.16/src/format.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/format.c 2013-11-16 05:12:41.000000000 +0100 @@ -10,6 +10,7 @@ #include <errno.h> #include <stdbool.h> #include <stddef.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -431,7 +432,7 @@ { #define IMM(fmt, type) \ snprintf(buf, sizeof(buf), (fmt), \ - static_cast(type, reinterpret_cast(long, entry->ptr))); \ + static_cast(type, reinterpret_cast(uintptr_t, entry->ptr))); \ break; #define PTR(fmt, type) \ snprintf(buf, sizeof(buf), (fmt), \ @@ -468,8 +469,8 @@ case HXTYPE_UINT: PTR("%u", unsigned int); case HXTYPE_LONG: PTR("%ld", long); case HXTYPE_ULONG: PTR("%lu", unsigned long); - case HXTYPE_LLONG: PTR("%lld", long long); - case HXTYPE_ULLONG: PTR("%llu", unsigned long long); + case HXTYPE_LLONG: PTR("%" HX_LONGLONG_FMT "d", long long); + case HXTYPE_ULLONG: PTR("%" HX_LONGLONG_FMT "u", unsigned long long); case HXTYPE_FLOAT: PTR("%f", float); case HXTYPE_DOUBLE: PTR("%f", double); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/io.c new/libHX-3.17/src/io.c --- old/libHX-3.16/src/io.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/io.c 2013-11-16 05:12:41.000000000 +0100 @@ -71,35 +71,43 @@ #ifdef _WIN32 if ((d = malloc(sizeof(*d))) == NULL) return NULL; - if ((d->dname = malloc(strlen(s) + 3)) == NULL) - goto out; + if ((d->dname = malloc(strlen(s) + 3)) == NULL) { + free(d); + return NULL; + } strcpy(d->dname, s); strcat(d->dname, "\\*"); d->got_first = false; #else /* - * On Linux-glibc, struct dirent contains a big d_name[256], - * but on Solaris, it is d_name[]. + * On Linux-glibc, the struct dirent definition contains a wasteful + * and bug-concealing "char d_name[256]", while on Solaris, it is a + * proper "char d_name[]". */ size_t size = sizeof(*d); - ssize_t name_max = pathconf(s, _PC_NAME_MAX); - + ssize_t name_max; + DIR *tmp_dh = opendir(s); + if (tmp_dh == NULL) + return NULL; + /* + * dirfd is POSIX.1-2008 and was present earlier in selected + * extensions. In case of !HAVE_DIRFD, use pathconf(s, _PC_NAME_MAX) + * and bite the race bullet. + */ + name_max = fpathconf(dirfd(tmp_dh), _PC_NAME_MAX); if (name_max > 0) { size -= sizeof(d->dentry) - offsetof(struct dirent, d_name); size += name_max + 1; } else { - size += NAME_MAX; + size += NAME_MAX; /* "best effort" :-/ */ } - if ((d = malloc(size)) == NULL) + if ((d = malloc(size)) == NULL) { + closedir(tmp_dh); return NULL; - if ((d->ptr = opendir(s)) == NULL) - goto out; + } + d->ptr = tmp_dh; #endif - return d; - out: - free(d); - return NULL; } EXPORT_SYMBOL const char *HXdir_read(struct HXdir *d) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/string.c new/libHX-3.17/src/string.c --- old/libHX-3.16/src/string.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/string.c 2013-11-16 05:12:41.000000000 +0100 @@ -38,7 +38,7 @@ const char *chars; }; -static const char HX_hexenc[] = "0123456789ABCDEF"; +static const char HX_hexenc[16] = "0123456789ABCDEF"; static __inline__ unsigned int min_uint(unsigned int a, unsigned int b) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/tc-compile.c new/libHX-3.17/src/tc-compile.c --- old/libHX-3.16/src/tc-compile.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/tc-compile.c 2013-11-16 05:12:41.000000000 +0100 @@ -18,15 +18,15 @@ if (HX_init() <= 0) abort(); - printf("sizeof bmllong:\t%zu, array_size: %zu\n", + printf("sizeof bmllong:\t%" HX_SIZET_FMT "u, array_size: %" HX_SIZET_FMT "u\n", sizeof(bmllong), ARRAY_SIZE(bmllong)); - printf("sizeof bmlong:\t%zu, array_size: %zu\n", + printf("sizeof bmlong:\t%" HX_SIZET_FMT "u, array_size: %" HX_SIZET_FMT "u\n", sizeof(bmlong), ARRAY_SIZE(bmlong)); - printf("sizeof bmint:\t%zu, array_size: %zu\n", + printf("sizeof bmint:\t%" HX_SIZET_FMT "u, array_size: %" HX_SIZET_FMT "u\n", sizeof(bmint), ARRAY_SIZE(bmint)); - printf("sizeof bmshort:\t%zu, array_size: %zu\n", + printf("sizeof bmshort:\t%" HX_SIZET_FMT "u, array_size: %" HX_SIZET_FMT "u\n", sizeof(bmshort), ARRAY_SIZE(bmshort)); - printf("sizeof bmchar:\t%zu, array_size: %zu\n", + printf("sizeof bmchar:\t%" HX_SIZET_FMT "u, array_size: %" HX_SIZET_FMT "u\n", sizeof(bmchar), ARRAY_SIZE(bmchar)); HXbitmap_set(bmllong, 255); HXbitmap_set(bmlong, 255); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/tc-dir.c new/libHX-3.17/src/tc-dir.c --- old/libHX-3.16/src/tc-dir.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/tc-dir.c 2013-11-16 05:12:41.000000000 +0100 @@ -15,19 +15,31 @@ #include <libHX/init.h> #include <libHX/misc.h> -int main(void) +static void lookatdir(const char *dname) { - struct HXdir *d; + struct HXdir *dh; const char *n; - if (HX_init() <= 0) - abort(); - d = HXdir_open("/tmp"); - printf("Available files in /tmp:\n"); - while ((n = HXdir_read(d)) != NULL) + dh = HXdir_open(dname); + printf("Available files in %s:\n", dname); + while ((n = HXdir_read(dh)) != NULL) printf("\t" "%s\n", n); + HXdir_close(dh); +} - HXdir_close(d); +int main(int argc, const char **argv) +{ + if (HX_init() <= 0) + abort(); + if (argc == 1) { + /* On Windows VCRT, "/" yields nothing, "c:/" is needed */ + lookatdir("/"); + lookatdir("c:/"); + lookatdir("."); + } else { + while (*++argv != NULL) + lookatdir(*argv); + } HX_exit(); return EXIT_SUCCESS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/tc-link.c new/libHX-3.17/src/tc-link.c --- old/libHX-3.16/src/tc-link.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/tc-link.c 2013-11-16 05:12:41.000000000 +0100 @@ -116,16 +116,24 @@ HX_strsep2, HX_strquote, HX_strupper, - HX_diff_timespec, +#ifdef HAVE_STRUCT_TIMEVAL_TV_USEC HX_diff_timeval, +#endif +#ifdef HAVE_STRUCT_TIMESPEC_TV_NSEC + HX_diff_timespec, +#endif HX_time_compare, +#ifdef HAVE_STRUCT_TIMESPEC_TV_NSEC HX_timespec_add, HX_timespec_isneg, HX_timespec_mul, HX_timespec_mulf, HX_timespec_neg, HX_timespec_sub, +#endif +#ifdef HAVE_STRUCT_TIMEVAL_TV_USEC HX_timeval_sub, +#endif #ifdef _WIN32 chown, fchmod, @@ -148,6 +156,6 @@ for (i = 0; i < ARRAY_SIZE(funcs); ++i) printf("%p ", funcs[i]); printf("\n"); - printf("There are %zu exported functions\n", ARRAY_SIZE(funcs)); + printf("There are %" HX_SIZET_FMT "u exported functions\n", ARRAY_SIZE(funcs)); return EXIT_SUCCESS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/tc-map.c new/libHX-3.17/src/tc-map.c --- old/libHX-3.16/src/tc-map.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/tc-map.c 2013-11-16 05:12:41.000000000 +0100 @@ -6,12 +6,11 @@ * modify it under the terms of the WTF Public License version 2 or * (at your option) any later version. */ -#include <sys/resource.h> -#include <sys/time.h> #include <errno.h> #include <math.h> #include <stdarg.h> #include <stddef.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <time.h> @@ -19,6 +18,10 @@ #include <libHX/map.h> #include <libHX/misc.h> #include <libHX/string.h> +#ifdef HAVE_SYS_RESOURCE_H +# include <sys/resource.h> +#endif +#include <sys/time.h> #include "internal.h" #include "map_int.h" @@ -58,9 +61,13 @@ static void tmap_time(struct timeval *tv) { +#ifdef HAVE_SYS_RESOURCE_H struct rusage r; if (getrusage(RUSAGE_SELF, &r) == 0) *tv = r.ru_utime; +#else + memset(tv, 0, sizeof(*tv)); +#endif } static unsigned int tmap_smart_rand(unsigned int *left, unsigned int *right) @@ -660,7 +667,7 @@ unsigned int left = 1; while (u.map->items != 0) { - unsigned long number = tmap_smart_rand(&left, &range); + uintptr_t number = tmap_smart_rand(&left, &range); HXmap_del(u.map, reinterpret_cast(const void *, number)); if (errno == -ENOENT) @@ -689,7 +696,7 @@ left = 1; right = elems + 1; for (i = 0; i < elems; ++i) { - unsigned long z = tmap_smart_rand(&left, &right); + uintptr_t z = tmap_smart_rand(&left, &right); ret = HXmap_add(u.map, reinterpret_cast(const void *, z), NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/tc-string.c new/libHX-3.17/src/tc-string.c --- old/libHX-3.16/src/tc-string.c 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/tc-string.c 2013-11-16 05:12:41.000000000 +0100 @@ -28,16 +28,16 @@ hxmc_t *s, *old_s; s = HXmc_meminit(NULL, 4096); - printf("%zu\n", HXmc_length(s)); + printf("%" HX_SIZET_FMT "u\n", HXmc_length(s)); if (HXmc_length(s) != 0) abort(); old_s = s; HXmc_trunc(&s, 8192); if (old_s != s) fprintf(stderr, "INFO: HXmc: no reallocation took place.\n"); - printf("Length is now %zu\n", HXmc_length(s)); + printf("Length is now %" HX_SIZET_FMT "u\n", HXmc_length(s)); HXmc_setlen(&s, 16384); - printf("Length is now %zu\n", HXmc_length(s)); + printf("Length is now %" HX_SIZET_FMT "u\n", HXmc_length(s)); HXmc_free(s); } @@ -115,7 +115,8 @@ static void t_strnlen(void) { static const char s[] = "Hello world"; - printf("# strnlen: %zu %zu %zu %zu %zu\n", + printf("# strnlen: %" HX_SIZET_FMT "u %" HX_SIZET_FMT "u " + "%" HX_SIZET_FMT "u %" HX_SIZET_FMT "u %" HX_SIZET_FMT "u\n", HX_strnlen(s, -1), HX_strnlen(s, 0), HX_strnlen(s, 1), HX_strnlen(s, strlen(s)), HX_strnlen(s, 999)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-3.16/src/uxcompat.h new/libHX-3.17/src/uxcompat.h --- old/libHX-3.16/src/uxcompat.h 2013-09-29 21:57:55.000000000 +0200 +++ new/libHX-3.17/src/uxcompat.h 2013-11-16 05:12:41.000000000 +0100 @@ -1,7 +1,7 @@ #ifndef _LIBHX_UXCOMPAT_H #define _LIBHX_UXCOMPAT_H 1 -#ifdef __cplusplus +#if defined(__cplusplus) && __cplusplus >= 201100UL # include <cstddef> # include <cstdint> #else @@ -67,6 +67,8 @@ # define S_IWOTH 00002 #endif +struct stat; + /* * UX-FILE.C */ -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org