From DONOTREPLY at icculus.org Thu Mar 23 01:49:01 2006 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 23 Mar 2006 01:49:01 -0500 Subject: r784 - branches/stable-1.0 trunk Message-ID: <20060323064901.11612.qmail@icculus.org> Author: icculus Date: 2006-03-23 01:49:01 -0500 (Thu, 23 Mar 2006) New Revision: 784 Modified: branches/stable-1.0/CHANGELOG branches/stable-1.0/configure.in branches/stable-1.0/physfs.h trunk/CHANGELOG trunk/configure.in trunk/physfs.h Log: Added -fvisibility=hidden support, for builds by gcc4 and later. All the sordid reasons for this are laid out here: http://gcc.gnu.org/wiki/Visibility Modified: branches/stable-1.0/CHANGELOG =================================================================== --- branches/stable-1.0/CHANGELOG 2006-01-01 13:03:22 UTC (rev 783) +++ branches/stable-1.0/CHANGELOG 2006-03-23 06:49:01 UTC (rev 784) @@ -4,6 +4,7 @@ -- stuff in the stable-1.0 branch, backported from 2.0.0 dev branch, etc --- +03232006 - Added -fvisibility for gcc4 (http://gcc.gnu.org/wiki/Visibility) 01012006 - Added physfs.rc (thanks, Dennis!). Changed my email address. 11282005 - Whitespace fix, and corrected docs on PHYSFS_setWriteDir(). 09062005 - Happy September. Minor MingW fixes (but it's still broken, I think). Modified: branches/stable-1.0/configure.in =================================================================== --- branches/stable-1.0/configure.in 2006-01-01 13:03:22 UTC (rev 783) +++ branches/stable-1.0/configure.in 2006-03-23 06:49:01 UTC (rev 784) @@ -68,19 +68,40 @@ , enable_debug=no) if test x$enable_debug = xyes; then if test x$ac_cv_prog_cc_g = xyes; then - PHYSFSCFLAGS="-g -O0" + PHYSFSCFLAGS="$PHYSFSCFLAGS -g -O0" else - PHYSFSCFLAGS="-O0" + PHYSFSCFLAGS="$PHYSFSCFLAGS -O0" fi PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall" AC_DEFINE([DEBUG], 1, [define if debug build is enabled]) AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled]) else - PHYSFSCFLAGS="-O2" + PHYSFSCFLAGS="$PHYSFSCFLAGS -O2" AC_DEFINE([NDEBUG], 1, [define if debug build is disabled]) fi +dnl --------------------------------------------------------------------- +dnl Have GCC's -fvisibility option? +dnl --------------------------------------------------------------------- +AC_MSG_CHECKING(for GCC -fvisibility=hidden option) +have_gcc_fvisibility=no +visibility_CFLAGS="-fvisibility=hidden" +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS $visibility_CFLAGS" +AC_TRY_COMPILE([ +int placeholder = 1; +],[ +],[ +have_gcc_fvisibility=yes +]) +AC_MSG_RESULT($have_gcc_fvisibility) +CFLAGS="$save_CFLAGS" +if test x$have_gcc_fvisibility = xyes; then + PHYSFSCFLAGS="$PHYSFSCFLAGS $visibility_CFLAGS" +fi + + dnl --------------------------------------------------------------------- dnl Profile sorts, etc? dnl --------------------------------------------------------------------- Modified: branches/stable-1.0/physfs.h =================================================================== --- branches/stable-1.0/physfs.h 2006-01-01 13:03:22 UTC (rev 783) +++ branches/stable-1.0/physfs.h 2006-03-23 06:49:01 UTC (rev 784) @@ -153,6 +153,8 @@ #ifndef DOXYGEN_SHOULD_IGNORE_THIS #if (defined _MSC_VER) #define __EXPORT__ __declspec(dllexport) +#elif (defined __GNUC__) +#define __EXPORT__ __attribute__((visibility("default"))) #else #define __EXPORT__ #endif Modified: trunk/CHANGELOG =================================================================== --- trunk/CHANGELOG 2006-01-01 13:03:22 UTC (rev 783) +++ trunk/CHANGELOG 2006-03-23 06:49:01 UTC (rev 784) @@ -2,6 +2,7 @@ * CHANGELOG. */ +03232006 - Added -fvisibility for gcc4 (http://gcc.gnu.org/wiki/Visibility) 01012006 - Cleaned up overflow checks in platform memory allocators (thanks to Nicolas Lebedenco for pointing out the original issue with long long literals). Added physfs.rc (thanks, Dennis!). Changed my Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2006-01-01 13:03:22 UTC (rev 783) +++ trunk/configure.in 2006-03-23 06:49:01 UTC (rev 784) @@ -68,20 +68,42 @@ , enable_debug=no) if test x$enable_debug = xyes; then if test x$ac_cv_prog_cc_g = xyes; then - PHYSFSCFLAGS="-g -O0" + PHYSFSCFLAGS="$PHYSFSCFLAGS -g -O0" else - PHYSFSCFLAGS="-O0" + PHYSFSCFLAGS="$PHYSFSCFLAGS -O0" fi PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall" AC_DEFINE([DEBUG], 1, [define if debug build is enabled]) AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled]) else - PHYSFSCFLAGS="-O2" + PHYSFSCFLAGS="$PHYSFSCFLAGS -O2" AC_DEFINE([NDEBUG], 1, [define if debug build is disabled]) fi dnl --------------------------------------------------------------------- +dnl Have GCC's -fvisibility option? +dnl --------------------------------------------------------------------- +AC_MSG_CHECKING(for GCC -fvisibility=hidden option) +have_gcc_fvisibility=no +visibility_CFLAGS="-fvisibility=hidden" +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS $visibility_CFLAGS" +AC_TRY_COMPILE([ +int placeholder = 1; +],[ +],[ +have_gcc_fvisibility=yes +]) +AC_MSG_RESULT($have_gcc_fvisibility) +CFLAGS="$save_CFLAGS" + +if test x$have_gcc_fvisibility = xyes; then + PHYSFSCFLAGS="$PHYSFSCFLAGS $visibility_CFLAGS" +fi + + +dnl --------------------------------------------------------------------- dnl Profile sorts, etc? dnl --------------------------------------------------------------------- Modified: trunk/physfs.h =================================================================== --- trunk/physfs.h 2006-01-01 13:03:22 UTC (rev 783) +++ trunk/physfs.h 2006-03-23 06:49:01 UTC (rev 784) @@ -166,6 +166,8 @@ #ifndef DOXYGEN_SHOULD_IGNORE_THIS #if (defined _MSC_VER) #define __EXPORT__ __declspec(dllexport) +#elif (defined __GNUC__) +#define __EXPORT__ __attribute__((visibility("default"))) #else #define __EXPORT__ #endif From DONOTREPLY at icculus.org Thu Mar 23 05:15:29 2006 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 23 Mar 2006 05:15:29 -0500 Subject: r785 - branches/stable-1.0 trunk Message-ID: <20060323101529.431.qmail@icculus.org> Author: icculus Date: 2006-03-23 05:15:29 -0500 (Thu, 23 Mar 2006) New Revision: 785 Modified: branches/stable-1.0/physfs.h trunk/physfs.h Log: Apparently the visibility attribute only exists in gcc3 and up. Modified: branches/stable-1.0/physfs.h =================================================================== --- branches/stable-1.0/physfs.h 2006-03-23 06:49:01 UTC (rev 784) +++ branches/stable-1.0/physfs.h 2006-03-23 10:15:29 UTC (rev 785) @@ -153,7 +153,7 @@ #ifndef DOXYGEN_SHOULD_IGNORE_THIS #if (defined _MSC_VER) #define __EXPORT__ __declspec(dllexport) -#elif (defined __GNUC__) +#elif (__GNUC__ >= 3) #define __EXPORT__ __attribute__((visibility("default"))) #else #define __EXPORT__ Modified: trunk/physfs.h =================================================================== --- trunk/physfs.h 2006-03-23 06:49:01 UTC (rev 784) +++ trunk/physfs.h 2006-03-23 10:15:29 UTC (rev 785) @@ -166,7 +166,7 @@ #ifndef DOXYGEN_SHOULD_IGNORE_THIS #if (defined _MSC_VER) #define __EXPORT__ __declspec(dllexport) -#elif (defined __GNUC__) +#elif (__GNUC__ >= 3) #define __EXPORT__ __attribute__((visibility("default"))) #else #define __EXPORT__ From DONOTREPLY at icculus.org Thu Mar 23 05:19:55 2006 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 23 Mar 2006 05:19:55 -0500 Subject: r786 - trunk Message-ID: <20060323101955.937.qmail@icculus.org> Author: icculus Date: 2006-03-23 05:19:55 -0500 (Thu, 23 Mar 2006) New Revision: 786 Modified: trunk/TODO Log: Updated. Modified: trunk/TODO =================================================================== --- trunk/TODO 2006-03-23 10:15:29 UTC (rev 785) +++ trunk/TODO 2006-03-23 10:19:55 UTC (rev 786) @@ -47,6 +47,7 @@ - maybe other stuff. - Is -Wall enabled? - Make mutexes recursive, so callbacks can call into the API. +- Archivers need abstracted i/o to read from memory or files (archives in archives?) // end of TODO ...