PennMUSH Community

Changeset 1274

Show
Ignore:
Timestamp:
09/18/08 20:54:15 (2 months ago)
Author:
shawnw
Message:

Some fixes from the last few commits. I'm not testing enough.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/branches/devel/aclocal.m4

    r1271 r1274  
    11311131    popdef([VARIABLE]) 
    11321132]) 
     1133 
     1134# =========================================================================== 
     1135#            http://autoconf-archive.cryp.to/ax_path_lib_pcre.html 
     1136# =========================================================================== 
     1137# 
     1138# SYNOPSIS 
     1139# 
     1140#   AX_PATH_LIB_PCRE [(A/NA)] 
     1141# 
     1142# DESCRIPTION 
     1143# 
     1144#   check for pcre lib and set PCRE_LIBS and PCRE_CFLAGS accordingly. 
     1145# 
     1146#   also provide --with-pcre option that may point to the $prefix of the 
     1147#   pcre installation - the macro will check $pcre/include and $pcre/lib to 
     1148#   contain the necessary files. 
     1149# 
     1150#   the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported and 
     1151#   they can take advantage of the LIBS/CFLAGS additions. 
     1152# 
     1153# LAST MODIFICATION 
     1154# 
     1155#   2008-04-12 
     1156# 
     1157# COPYLEFT 
     1158# 
     1159#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> 
     1160# 
     1161#   This program is free software; you can redistribute it and/or modify it 
     1162#   under the terms of the GNU General Public License as published by the 
     1163#   Free Software Foundation; either version 2 of the License, or (at your 
     1164#   option) any later version. 
     1165# 
     1166#   This program is distributed in the hope that it will be useful, but 
     1167#   WITHOUT ANY WARRANTY; without even the implied warranty of 
     1168#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 
     1169#   Public License for more details. 
     1170# 
     1171#   You should have received a copy of the GNU General Public License along 
     1172#   with this program. If not, see <http://www.gnu.org/licenses/>. 
     1173# 
     1174#   As a special exception, the respective Autoconf Macro's copyright owner 
     1175#   gives unlimited permission to copy, distribute and modify the configure 
     1176#   scripts that are the output of Autoconf when processing the Macro. You 
     1177#   need not follow the terms of the GNU General Public License when using 
     1178#   or distributing such scripts, even though portions of the text of the 
     1179#   Macro appear in them. The GNU General Public License (GPL) does govern 
     1180#   all other use of the material that constitutes the Autoconf Macro. 
     1181# 
     1182#   This special exception to the GPL applies to versions of the Autoconf 
     1183#   Macro released by the Autoconf Macro Archive. When you make and 
     1184#   distribute a modified version of the Autoconf Macro, you may extend this 
     1185#   special exception to the GPL to apply to your modified version as well. 
     1186 
     1187AC_DEFUN([AX_PATH_LIB_PCRE],[dnl 
     1188AC_MSG_CHECKING([lib pcre]) 
     1189AC_ARG_WITH(pcre, 
     1190[  --with-pcre[[=prefix]]    compile xmlpcre part (via libpcre check)],, 
     1191     with_pcre="yes") 
     1192if test ".$with_pcre" = ".no" ; then 
     1193  AC_MSG_RESULT([disabled]) 
     1194  m4_ifval($2,$2) 
     1195else 
     1196  AC_MSG_RESULT([(testing)]) 
     1197  AC_CHECK_LIB(pcre, pcre_study) 
     1198  if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then 
     1199     PCRE_LIBS="-lpcre" 
     1200     AC_MSG_CHECKING([lib pcre]) 
     1201     AC_MSG_RESULT([$PCRE_LIBS]) 
     1202     m4_ifval($1,$1) 
     1203  else 
     1204     OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib" 
     1205     OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include" 
     1206     AC_CHECK_LIB(pcre, pcre_compile) 
     1207     CPPFLAGS="$OLDCPPFLAGS" 
     1208     LDFLAGS="$OLDLDFLAGS" 
     1209     if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then 
     1210        AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre) 
     1211        PCRE_LIBS="-L$with_pcre/lib -lpcre" 
     1212        test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include" 
     1213        AC_MSG_CHECKING([lib pcre]) 
     1214        AC_MSG_RESULT([$PCRE_LIBS]) 
     1215        m4_ifval($1,$1) 
     1216     else 
     1217        AC_MSG_CHECKING([lib pcre]) 
     1218        AC_MSG_RESULT([no, (WARNING)]) 
     1219        m4_ifval($2,$2) 
     1220     fi 
     1221  fi 
     1222fi 
     1223AC_SUBST([PCRE_LIBS]) 
     1224AC_SUBST([PCRE_CFLAGS]) 
     1225]) 
  • 1.8.3/branches/devel/configure

    r1272 r1274  
    652652MYSQL_VERSION 
    653653MYSQL_CONFIG 
     654PCRE_CFLAGS 
     655PCRE_LIBS 
    654656HAVE_SSL 
    655657EGREP 
     
    729731with_perl 
    730732with_ssl 
     733with_pcre 
    731734enable_sql 
    732735with_mysql 
     
    13841387                          with the default search path) 
    13851388 
     1389  --with-pcre[=prefix]    compile xmlpcre part (via libpcre check) 
    13861390  --with-mysql=[ARG]      use MySQL client library [default=yes], optionally 
    13871391                          specify path to mysql_config 
     
    1225712261 
    1225812262# system libpcre 
    12259 AX_PATH_LIB_PCRE() 
     12263{ $as_echo "$as_me:$LINENO: checking lib pcre" >&5 
     12264$as_echo_n "checking lib pcre... " >&6; } 
     12265 
     12266# Check whether --with-pcre was given. 
     12267if test "${with_pcre+set}" = set; then 
     12268  withval=$with_pcre; 
     12269else 
     12270  with_pcre="yes" 
     12271fi 
     12272 
     12273if test ".$with_pcre" = ".no" ; then 
     12274  { $as_echo "$as_me:$LINENO: result: disabled" >&5 
     12275$as_echo "disabled" >&6; } 
     12276 
     12277else 
     12278  { $as_echo "$as_me:$LINENO: result: (testing)" >&5 
     12279$as_echo "(testing)" >&6; } 
     12280 
     12281{ $as_echo "$as_me:$LINENO: checking for pcre_study in -lpcre" >&5 
     12282$as_echo_n "checking for pcre_study in -lpcre... " >&6; } 
     12283if test "${ac_cv_lib_pcre_pcre_study+set}" = set; then 
     12284  $as_echo_n "(cached) " >&6 
     12285else 
     12286  ac_check_lib_save_LIBS=$LIBS 
     12287LIBS="-lpcre  $LIBS" 
     12288cat >conftest.$ac_ext <<_ACEOF 
     12289/* confdefs.h.  */ 
     12290_ACEOF 
     12291cat confdefs.h >>conftest.$ac_ext 
     12292cat >>conftest.$ac_ext <<_ACEOF 
     12293/* end confdefs.h.  */ 
     12294 
     12295/* Override any GCC internal prototype to avoid an error. 
     12296   Use char because int might match the return type of a GCC 
     12297   builtin and then its argument prototype would still apply.  */ 
     12298#ifdef __cplusplus 
     12299extern "C" 
     12300#endif 
     12301char pcre_study (); 
     12302int 
     12303main () 
     12304
     12305return pcre_study (); 
     12306  ; 
     12307  return 0; 
     12308
     12309_ACEOF 
     12310rm -f conftest.$ac_objext conftest$ac_exeext 
     12311if { (ac_try="$ac_link" 
     12312case "(($ac_try" in 
     12313  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     12314  *) ac_try_echo=$ac_try;; 
     12315esac 
     12316eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 
     12317$as_echo "$ac_try_echo") >&5 
     12318  (eval "$ac_link") 2>conftest.er1 
     12319  ac_status=$? 
     12320  grep -v '^ *+' conftest.er1 >conftest.err 
     12321  rm -f conftest.er1 
     12322  cat conftest.err >&5 
     12323  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     12324  (exit $ac_status); } && { 
     12325     test -z "$ac_c_werror_flag" || 
     12326     test ! -s conftest.err 
     12327       } && test -s conftest$ac_exeext && { 
     12328     test "$cross_compiling" = yes || 
     12329     $as_test_x conftest$ac_exeext 
     12330       }; then 
     12331  ac_cv_lib_pcre_pcre_study=yes 
     12332else 
     12333  $as_echo "$as_me: failed program was:" >&5 
     12334sed 's/^/| /' conftest.$ac_ext >&5 
     12335 
     12336    ac_cv_lib_pcre_pcre_study=no 
     12337fi 
     12338 
     12339rm -rf conftest.dSYM 
     12340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     12341      conftest$ac_exeext conftest.$ac_ext 
     12342LIBS=$ac_check_lib_save_LIBS 
     12343fi 
     12344{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pcre_pcre_study" >&5 
     12345$as_echo "$ac_cv_lib_pcre_pcre_study" >&6; } 
     12346if test "x$ac_cv_lib_pcre_pcre_study" = x""yes; then 
     12347  cat >>confdefs.h <<_ACEOF 
     12348#define HAVE_LIBPCRE 1 
     12349_ACEOF 
     12350 
     12351  LIBS="-lpcre $LIBS" 
     12352 
     12353fi 
     12354 
     12355  if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then 
     12356     PCRE_LIBS="-lpcre" 
     12357     { $as_echo "$as_me:$LINENO: checking lib pcre" >&5 
     12358$as_echo_n "checking lib pcre... " >&6; } 
     12359     { $as_echo "$as_me:$LINENO: result: $PCRE_LIBS" >&5 
     12360$as_echo "$PCRE_LIBS" >&6; } 
     12361 
     12362  else 
     12363     OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib" 
     12364     OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include" 
     12365 
     12366{ $as_echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5 
     12367$as_echo_n "checking for pcre_compile in -lpcre... " >&6; } 
     12368if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then 
     12369  $as_echo_n "(cached) " >&6 
     12370else 
     12371  ac_check_lib_save_LIBS=$LIBS 
     12372LIBS="-lpcre  $LIBS" 
     12373cat >conftest.$ac_ext <<_ACEOF 
     12374/* confdefs.h.  */ 
     12375_ACEOF 
     12376cat confdefs.h >>conftest.$ac_ext 
     12377cat >>conftest.$ac_ext <<_ACEOF 
     12378/* end confdefs.h.  */ 
     12379 
     12380/* Override any GCC internal prototype to avoid an error. 
     12381   Use char because int might match the return type of a GCC 
     12382   builtin and then its argument prototype would still apply.  */ 
     12383#ifdef __cplusplus 
     12384extern "C" 
     12385#endif 
     12386char pcre_compile (); 
     12387int 
     12388main () 
     12389
     12390return pcre_compile (); 
     12391  ; 
     12392  return 0; 
     12393
     12394_ACEOF 
     12395rm -f conftest.$ac_objext conftest$ac_exeext 
     12396if { (ac_try="$ac_link" 
     12397case "(($ac_try" in 
     12398  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     12399  *) ac_try_echo=$ac_try;; 
     12400esac 
     12401eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 
     12402$as_echo "$ac_try_echo") >&5 
     12403  (eval "$ac_link") 2>conftest.er1 
     12404  ac_status=$? 
     12405  grep -v '^ *+' conftest.er1 >conftest.err 
     12406  rm -f conftest.er1 
     12407  cat conftest.err >&5 
     12408  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     12409  (exit $ac_status); } && { 
     12410     test -z "$ac_c_werror_flag" || 
     12411     test ! -s conftest.err 
     12412       } && test -s conftest$ac_exeext && { 
     12413     test "$cross_compiling" = yes || 
     12414     $as_test_x conftest$ac_exeext 
     12415       }; then 
     12416  ac_cv_lib_pcre_pcre_compile=yes 
     12417else 
     12418  $as_echo "$as_me: failed program was:" >&5 
     12419sed 's/^/| /' conftest.$ac_ext >&5 
     12420 
     12421    ac_cv_lib_pcre_pcre_compile=no 
     12422fi 
     12423 
     12424rm -rf conftest.dSYM 
     12425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     12426      conftest$ac_exeext conftest.$ac_ext 
     12427LIBS=$ac_check_lib_save_LIBS 
     12428fi 
     12429{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pcre_pcre_compile" >&5 
     12430$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; } 
     12431if test "x$ac_cv_lib_pcre_pcre_compile" = x""yes; then 
     12432  cat >>confdefs.h <<_ACEOF 
     12433#define HAVE_LIBPCRE 1 
     12434_ACEOF 
     12435 
     12436  LIBS="-lpcre $LIBS" 
     12437 
     12438fi 
     12439 
     12440     CPPFLAGS="$OLDCPPFLAGS" 
     12441     LDFLAGS="$OLDLDFLAGS" 
     12442     if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then 
     12443        { $as_echo "$as_me:$LINENO: result: .setting PCRE_LIBS -L$with_pcre/lib -lpcre" >&5 
     12444$as_echo ".setting PCRE_LIBS -L$with_pcre/lib -lpcre" >&6; } 
     12445        PCRE_LIBS="-L$with_pcre/lib -lpcre" 
     12446        test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include" 
     12447        { $as_echo "$as_me:$LINENO: checking lib pcre" >&5 
     12448$as_echo_n "checking lib pcre... " >&6; } 
     12449        { $as_echo "$as_me:$LINENO: result: $PCRE_LIBS" >&5 
     12450$as_echo "$PCRE_LIBS" >&6; } 
     12451 
     12452     else 
     12453        { $as_echo "$as_me:$LINENO: checking lib pcre" >&5 
     12454$as_echo_n "checking lib pcre... " >&6; } 
     12455        { $as_echo "$as_me:$LINENO: result: no, (WARNING)" >&5 
     12456$as_echo "no, (WARNING)" >&6; } 
     12457 
     12458     fi 
     12459  fi 
     12460fi 
     12461 
     12462 
     12463 
    1226012464if test "${PCRE_LIBS+set}" = "set"; then 
    1226112465   cat >>confdefs.h <<\_ACEOF 
  • 1.8.3/branches/devel/src/chunk.c

    r1272 r1274  
    225225#else 
    226226#define _XOPEN_SOURCE 500 
     227#define __USE_UNIX98 
    227228#include <unistd.h> 
    228229#endif 
     
    13331334  for (j = 0; j < 10; j++) { 
    13341335     
    1335 #if defined(HAVE_PWRITE 
     1336#if defined(HAVE_PWRITE) 
    13361337    done = pwrite(fd, pos, remaining, file_offset); 
    13371338#elif defined(WIN32) && !defined(__MINGW32__) 
     
    13501351    } 
    13511352  } 
    1352 #endif 
    13531353#ifdef WIN32 
    13541354  mush_panicf("chunk swap file write, %lu remaining, GetLastError %d", 
     
    13571357  mush_panicf("chunk swap file write, %lu remaining, errno %d: %s", 
    13581358              (unsigned long) remaining, errno, strerror(errno)); 
     1359#endif 
    13591360} 
    13601361