Index: autogen.sh ================================================================== --- autogen.sh +++ autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh aclocal -I m4 || exit 1 autoconf || exit 1 autoheader || exit 1 -./configure $@ +./configure "$@" || exit 1 Index: config.guess ================================================================== --- config.guess +++ config.guess @@ -2,11 +2,11 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2008-01-08' +timestamp='2008-11-15' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. @@ -329,11 +329,24 @@ exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. @@ -794,11 +807,11 @@ *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; @@ -933,10 +946,13 @@ esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; @@ -983,13 +999,10 @@ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; @@ -1213,10 +1226,13 @@ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) @@ -1482,13 +1498,13 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be pertinent to in order to provide the needed information to handle your system. Index: config.sub ================================================================== --- config.sub +++ config.sub @@ -2,11 +2,11 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2008-01-16' +timestamp='2008-09-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # @@ -248,16 +248,18 @@ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ @@ -284,11 +286,11 @@ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -329,16 +331,18 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ @@ -362,18 +366,18 @@ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; @@ -457,10 +461,14 @@ ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) @@ -524,10 +532,14 @@ ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) @@ -1126,10 +1138,14 @@ ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none ;; @@ -1246,11 +1262,11 @@ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1386,10 +1402,13 @@ os=-kaos ;; -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -7,16 +7,12 @@ AC_PROG_OBJC AC_PROG_CPP AC_PROG_LN_S AC_PATH_PROG(AR, ar) -case "$CC" in - gcc | *-gcc | gcc-* | *-gcc-*) - OBJCFLAGS="$OBJSFLAGS -Wall -Werror -pipe -g" - ;; -esac - +OBJCFLAGS="$OBJCFLAGS -Wall" +test x"$GCC" = x"yes" && OBJCFLAGS="$OBJSFLAGS -Werror -pipe -g" OBJCFLAGS="$OBJCFLAGS -fobjc-exceptions" BUILDSYS_SHARED_LIB AC_DEFINE(OF_CONFIG_H, 1, [Define so that we know we got our config.h]) @@ -51,13 +47,13 @@ have_ipv6="yes", have_ipv6="no", have_ipv6="no") AC_MSG_RESULT($have_ipv6) test x"$have_ipv6" = x"yes" && \ AC_DEFINE(HAVE_IPV6, 1, "Whether we have IPv6 support") -test $cross_compiling != x"yes" && AC_SUBST(TESTS, "tests") +test x"$cross_compiling" != x"yes" && AC_SUBST(TESTS, "tests") BUILDSYS_TOUCH_DEPS AC_SUBST(PACKAGE, objfw) AC_CONFIG_FILES([buildsys.mk extra.mk]) AC_CONFIG_HEADERS(config.h) AC_OUTPUT Index: m4/buildsys.m4 ================================================================== --- m4/buildsys.m4 +++ m4/buildsys.m4 @@ -21,11 +21,11 @@ dnl AC_DEFUN([BUILDSYS_PROG_IMPLIB], [ AC_MSG_CHECKING(whether we need an implib) case "$target" in - *-*-cygwin | *-*-mingw32) + *-*-cygwin* | *-*-mingw*) AC_MSG_RESULT(yes) PROG_IMPLIB_NEEDED='yes' PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a' ;; *) @@ -70,11 +70,11 @@ PLUGIN_SUFFIX='.impl' INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' CLEAN_LIB='' ;; - *-*-solaris* | *-openbsd-* | *-mirbsd-*) + *-*-solaris* | *-*-openbsd* | *-*-mirbsd*) AC_MSG_RESULT(Solaris) LIB_CPPFLAGS='-DPIC' LIB_CFLAGS='-fPIC' LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}' LIB_PREFIX='lib' @@ -85,11 +85,11 @@ PLUGIN_SUFFIX='.so' INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' CLEAN_LIB='' ;; - *-*-cygwin | *-*-mingw32) + *-*-cygwin* | *-*-mingw*) AC_MSG_RESULT(Win32) LIB_CPPFLAGS='-DPIC' LIB_CFLAGS='' LIB_LDFLAGS='-shared -Wl,--out-implib,${LIB}.a' LIB_PREFIX='lib' Index: src/OFListObject.m ================================================================== --- src/OFListObject.m +++ src/OFListObject.m @@ -26,17 +26,19 @@ if ((self = [super init])) { next = nil; prev = nil; data = ptr; } + return self; } - freeIncludingData { if (data != NULL) free(data); + return [super free]; } - (void*)data { @@ -54,14 +56,16 @@ } - setNext: (OFListObject*)obj { next = obj; + return self; } - setPrev: (OFListObject*)obj { prev = obj; + return self; } @end Index: tests/OFArray/Makefile ================================================================== --- tests/OFArray/Makefile +++ tests/OFArray/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib Index: tests/OFHashes/Makefile ================================================================== --- tests/OFHashes/Makefile +++ tests/OFHashes/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib Index: tests/OFList/Makefile ================================================================== --- tests/OFList/Makefile +++ tests/OFList/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib Index: tests/OFList/OFList.m ================================================================== --- tests/OFList/OFList.m +++ tests/OFList/OFList.m @@ -16,12 +16,10 @@ #import #import #import "OFString.h" #import "OFList.h" - -/* TODO: Do real checks */ const wchar_t *strings[] = { L"First String Object", L"Second String Object", L"Third String Object" Index: tests/OFObject/Makefile ================================================================== --- tests/OFObject/Makefile +++ tests/OFObject/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib Index: tests/OFString/Makefile ================================================================== --- tests/OFString/Makefile +++ tests/OFString/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib Index: tests/OFString/OFString.m ================================================================== --- tests/OFString/OFString.m +++ tests/OFString/OFString.m @@ -14,12 +14,10 @@ #import #import #import "OFString.h" -/* TODO: Do real checks */ - int main() { OFString *s1 = [OFString newFromCString: "test"]; OFString *s2 = [OFString newFromCString: ""]; Index: tests/OFTCPSocket/Makefile ================================================================== --- tests/OFTCPSocket/Makefile +++ tests/OFTCPSocket/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib Index: tests/OFXMLFactory/Makefile ================================================================== --- tests/OFXMLFactory/Makefile +++ tests/OFXMLFactory/Makefile @@ -12,9 +12,9 @@ run: ${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib ln -s ../../src/libobjfw.so libobjfw.so.1 ln -s ../../src/libobjfw.so libobjfw.so.1.0 ln -s ../../src/libobjfw.dylib libobjfw.dylib - LD_LIBRARY_PATH=. \ - DYLD_LIBRARY_PATH=. \ + LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ + DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ ./${PROG_NOINST} rm -f libobjfw.so.1 libobjfw.so.1.0 libobjfw.dylib