Changeset 878
- Timestamp:
- 05/24/07 09:15:43 (1 year ago)
- Files:
-
- 1.8.3/branches/experimental/CHANGES.182 (modified) (1 diff)
- 1.8.3/branches/experimental/CHANGES.183 (modified) (1 diff)
- 1.8.3/branches/experimental/README.SQL (modified) (1 diff)
- 1.8.3/branches/experimental/config.h.in (modified) (3 diffs)
- 1.8.3/branches/experimental/configure (modified) (13 diffs)
- 1.8.3/branches/experimental/configure.in (modified) (5 diffs)
- 1.8.3/branches/experimental/game/txt/hlp/pennfunc.hlp (modified) (2 diffs)
- 1.8.3/branches/experimental/hdrs/atr_tab.h (modified) (1 diff)
- 1.8.3/branches/experimental/hdrs/attrib.h (modified) (2 diffs)
- 1.8.3/branches/experimental/hdrs/externs.h (modified) (2 diffs)
- 1.8.3/branches/experimental/hdrs/lock.h (modified) (4 diffs)
- 1.8.3/branches/experimental/hdrs/mushtype.h (modified) (2 diffs)
- 1.8.3/branches/experimental/hdrs/privtab.h (modified) (3 diffs)
- 1.8.3/branches/experimental/hdrs/ptab.h (modified) (1 diff)
- 1.8.3/branches/experimental/hdrs/wait.h (modified) (3 diffs)
- 1.8.3/branches/experimental/hints/freebsd.txt (modified) (1 diff)
- 1.8.3/branches/experimental/hints/linux.txt (modified) (1 diff)
- 1.8.3/branches/experimental/src/Makefile.in (modified) (4 diffs)
- 1.8.3/branches/experimental/src/access.c (modified) (2 diffs)
- 1.8.3/branches/experimental/src/atr_tab.c (modified) (1 diff)
- 1.8.3/branches/experimental/src/attrib.c (modified) (12 diffs)
- 1.8.3/branches/experimental/src/boolexp.c (modified) (14 diffs)
- 1.8.3/branches/experimental/src/bsd.c (modified) (5 diffs)
- 1.8.3/branches/experimental/src/command.c (modified) (1 diff)
- 1.8.3/branches/experimental/src/conf.c (modified) (1 diff)
- 1.8.3/branches/experimental/src/cque.c (modified) (6 diffs)
- 1.8.3/branches/experimental/src/db.c (modified) (3 diffs)
- 1.8.3/branches/experimental/src/fundb.c (modified) (2 diffs)
- 1.8.3/branches/experimental/src/game.c (modified) (6 diffs)
- 1.8.3/branches/experimental/src/info_master.c (modified) (2 diffs)
- 1.8.3/branches/experimental/src/info_slave.c (modified) (3 diffs)
- 1.8.3/branches/experimental/src/lock.c (modified) (12 diffs)
- 1.8.3/branches/experimental/src/myrlimit.c (modified) (3 diffs)
- 1.8.3/branches/experimental/src/pcre.c (modified) (1 diff)
- 1.8.3/branches/experimental/src/player.c (modified) (1 diff)
- 1.8.3/branches/experimental/src/portmsg.c (modified) (4 diffs)
- 1.8.3/branches/experimental/src/privtab.c (modified) (7 diffs)
- 1.8.3/branches/experimental/src/ptab.c (modified) (16 diffs)
- 1.8.3/branches/experimental/src/set.c (modified) (1 diff)
- 1.8.3/branches/experimental/src/sql.c (modified) (27 diffs)
- 1.8.3/branches/experimental/src/strutil.c (modified) (4 diffs)
- 1.8.3/branches/experimental/src/wait.c (modified) (2 diffs)
- 1.8.3/branches/experimental/src/warnings.c (modified) (2 diffs)
- 1.8.3/branches/experimental/utils/README.txt (modified) (1 diff)
- 1.8.3/branches/experimental/utils/splint.sh (copied) (copied from 1.8.3/branches/devel/utils/splint.sh)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/experimental/CHANGES.182
r857 r878 21 21 * Assorted gcc warning fixes. [SW] 22 22 23 Version 1.8.2 patchlevel 4 May ??, 2007 23 Fixes: 24 * Cleaned up some unsafe signal handler functions. [SW] 25 26 Version 1.8.2 patchlevel 4 May 16, 2007 24 27 25 28 Minor changes: 1.8.3/branches/experimental/CHANGES.183
r857 r878 23 23 * info_slave temporarily requires the presence of the socketpair(2) 24 24 function. [SW] 25 * Use of waitpid(2)/wait3(2) is encapsulated in mush_wait(). [SW] 25 * Use of some system calls with portability issues encapsulated in 26 wrapper functions. [SW] 27 * sql() returns error codes directly instead of notifying %!. [SW] 28 29 Fixes: 30 * Assorted compiler warning fixes. [SW] 31 * Won't compile on OS X 10.3. Reported by Viila. [SW] 32 * @sql wasn't enabled if Sqlite3 was the only database turned on. 33 Reported by qa'toq. 34 * Problems with sql() on Sqlite3. Reported by qa'toq. [SW] 26 35 27 36 Version 1.8.3 patchlevel 2 May 16, 2007 1.8.3/branches/experimental/README.SQL
r790 r878 177 177 178 178 As the same user account that runs the mush: 179 Edit mush.cnf so that sql_database is set to data/mush.db and 180 sql_platform is set to sqlite3. 179 181 % cd pennmush/game/data 180 182 % sqlite3 mush.db 1.8.3/branches/experimental/config.h.in
r857 r878 60 60 #undef HAVE_SYS_UN_H 61 61 62 #undef HAVE_SYS_RESOURCE_H 63 64 #undef HAVE_STDBOOL_H 65 62 66 /* Libraries */ 63 67 64 68 #undef HAVE_MYSQL 65 66 #ifdef HAVE_MYSQL67 #define HAS_MYSQL68 #endif69 69 70 70 #undef HAVE_POSTGRESQL … … 92 92 #undef pid_t 93 93 94 #ifdef HAVE__BOOL 95 typedef _Bool BOOL; 96 #else 97 typedef int BOOL; 98 #endif 99 94 100 typedef void* Malloc_t; 95 101 typedef void Free_t; … … 130 136 #undef HAS_SETLOCALE 131 137 132 #undef HAS_SETPGRP 138 #undef HAVE_FORK 139 140 #undef HAVE_SETPGRP 141 142 #undef HAVE_SETSID 143 144 #undef HAVE_SETPGID 133 145 134 146 #undef SETPGRP_VOID 1.8.3/branches/experimental/configure
r857 r878 2765 2765 ac_compiler_gnu=$ac_cv_c_compiler_gnu 2766 2766 2767 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 2768 echo $ECHO_N "checking for $CC option to accept ISO C99... $ECHO_C" >&6; } 2769 if test "${ac_cv_prog_cc_c99+set}" = set; then 2770 echo $ECHO_N "(cached) $ECHO_C" >&6 2771 else 2772 ac_cv_prog_cc_c99=no 2773 ac_save_CC=$CC 2774 cat >conftest.$ac_ext <<_ACEOF 2775 /* confdefs.h. */ 2776 _ACEOF 2777 cat confdefs.h >>conftest.$ac_ext 2778 cat >>conftest.$ac_ext <<_ACEOF 2779 /* end confdefs.h. */ 2780 #include <stdarg.h> 2781 #include <stdbool.h> 2782 #include <stdlib.h> 2783 #include <wchar.h> 2784 #include <stdio.h> 2785 2786 struct incomplete_array 2787 { 2788 int datasize; 2789 double data[]; 2790 }; 2791 2792 struct named_init { 2793 int number; 2794 const wchar_t *name; 2795 double average; 2796 }; 2797 2798 typedef const char *ccp; 2799 2800 static inline int 2801 test_restrict(ccp restrict text) 2802 { 2803 // See if C++-style comments work. 2804 // Iterate through items via the restricted pointer. 2805 // Also check for declarations in for loops. 2806 for (unsigned int i = 0; *(text+i) != '\0'; ++i) 2807 continue; 2808 return 0; 2809 } 2810 2811 // Check varargs and va_copy work. 2812 static void 2813 test_varargs(const char *format, ...) 2814 { 2815 va_list args; 2816 va_start(args, format); 2817 va_list args_copy; 2818 va_copy(args_copy, args); 2819 2820 const char *str; 2821 int number; 2822 float fnumber; 2823 2824 while (*format) 2825 { 2826 switch (*format++) 2827 { 2828 case 's': // string 2829 str = va_arg(args_copy, const char *); 2830 break; 2831 case 'd': // int 2832 number = va_arg(args_copy, int); 2833 break; 2834 case 'f': // float 2835 fnumber = (float) va_arg(args_copy, double); 2836 break; 2837 default: 2838 break; 2839 } 2840 } 2841 va_end(args_copy); 2842 va_end(args); 2843 } 2844 2845 int 2846 main () 2847 { 2848 2849 // Check bool and long long datatypes. 2850 _Bool success = false; 2851 long long int bignum = -1234567890LL; 2852 unsigned long long int ubignum = 1234567890uLL; 2853 2854 // Check restrict. 2855 if (test_restrict("String literal") != 0) 2856 success = true; 2857 char *restrict newvar = "Another string"; 2858 2859 // Check varargs. 2860 test_varargs("s, d' f .", "string", 65, 34.234); 2861 2862 // Check incomplete arrays work. 2863 struct incomplete_array *ia = 2864 malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10)); 2865 ia->datasize = 10; 2866 for (int i = 0; i < ia->datasize; ++i) 2867 ia->data[i] = (double) i * 1.234; 2868 2869 // Check named initialisers. 2870 struct named_init ni = { 2871 .number = 34, 2872 .name = L"Test wide string", 2873 .average = 543.34343, 2874 }; 2875 2876 ni.number = 58; 2877 2878 int dynamic_array[ni.number]; 2879 dynamic_array[43] = 543; 2880 2881 // work around unused variable warnings 2882 return bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'; 2883 2884 ; 2885 return 0; 2886 } 2887 _ACEOF 2888 for ac_arg in '' -std=gnu99 -c99 -qlanglvl=extc99 2889 do 2890 CC="$ac_save_CC $ac_arg" 2891 rm -f conftest.$ac_objext 2892 if { (ac_try="$ac_compile" 2893 case "(($ac_try" in 2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2895 *) ac_try_echo=$ac_try;; 2896 esac 2897 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2898 (eval "$ac_compile") 2>conftest.er1 2899 ac_status=$? 2900 grep -v '^ *+' conftest.er1 >conftest.err 2901 rm -f conftest.er1 2902 cat conftest.err >&5 2903 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2904 (exit $ac_status); } && 2905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2906 { (case "(($ac_try" in 2907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2908 *) ac_try_echo=$ac_try;; 2909 esac 2910 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2911 (eval "$ac_try") 2>&5 2912 ac_status=$? 2913 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2914 (exit $ac_status); }; } && 2915 { ac_try='test -s conftest.$ac_objext' 2916 { (case "(($ac_try" in 2917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2918 *) ac_try_echo=$ac_try;; 2919 esac 2920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2921 (eval "$ac_try") 2>&5 2922 ac_status=$? 2923 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2924 (exit $ac_status); }; }; then 2925 ac_cv_prog_cc_c99=$ac_arg 2926 else 2927 echo "$as_me: failed program was:" >&5 2928 sed 's/^/| /' conftest.$ac_ext >&5 2929 2930 2931 fi 2932 2933 rm -f core conftest.err conftest.$ac_objext 2934 test "x$ac_cv_prog_cc_c99" != "xno" && break 2935 done 2936 rm -f conftest.$ac_ext 2937 CC=$ac_save_CC 2938 2939 fi 2940 # AC_CACHE_VAL 2941 case "x$ac_cv_prog_cc_c99" in 2942 x) 2943 { echo "$as_me:$LINENO: result: none needed" >&5 2944 echo "${ECHO_T}none needed" >&6; } ;; 2945 xno) 2946 { echo "$as_me:$LINENO: result: unsupported" >&5 2947 echo "${ECHO_T}unsupported" >&6; } ;; 2948 *) 2949 CC="$CC $ac_cv_prog_cc_c99" 2950 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 2951 echo "${ECHO_T}$ac_cv_prog_cc_c99" >&6; } ;; 2952 esac 2953 2954 2955 2767 2956 # Extract the first word of "chmod", so it can be a program name with args. 2768 2957 set dummy chmod; ac_word=$2 … … 4098 4287 fi 4099 4288 4289 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 4300 inttypes.h stdint.h unistd.h 4301 do 4302 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 4303 { echo "$as_me:$LINENO: checking for $ac_header" >&5 4304 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } 4305 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 4306 echo $ECHO_N "(cached) $ECHO_C" >&6 4307 else 4308 cat >conftest.$ac_ext <<_ACEOF 4309 /* confdefs.h. */ 4310 _ACEOF 4311 cat confdefs.h >>conftest.$ac_ext 4312 cat >>conftest.$ac_ext <<_ACEOF 4313 /* end confdefs.h. */ 4314 $ac_includes_default 4315 4316 #include <$ac_header> 4317 _ACEOF 4318 rm -f conftest.$ac_objext 4319 if { (ac_try="$ac_compile" 4320 case "(($ac_try" in 4321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4322 *) ac_try_echo=$ac_try;; 4323 esac 4324 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4325 (eval "$ac_compile") 2>conftest.er1 4326 ac_status=$? 4327 grep -v '^ *+' conftest.er1 >conftest.err 4328 rm -f conftest.er1 4329 cat conftest.err >&5 4330 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4331 (exit $ac_status); } && 4332 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 4333 { (case "(($ac_try" in 4334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4335 *) ac_try_echo=$ac_try;; 4336 esac 4337 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4338 (eval "$ac_try") 2>&5 4339 ac_status=$? 4340 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4341 (exit $ac_status); }; } && 4342 { ac_try='test -s conftest.$ac_objext' 4343 { (case "(($ac_try" in 4344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4345 *) ac_try_echo=$ac_try;; 4346 esac 4347 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4348 (eval "$ac_try") 2>&5 4349 ac_status=$? 4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4351 (exit $ac_status); }; }; then 4352 eval "$as_ac_Header=yes" 4353 else 4354 echo "$as_me: failed program was:" >&5 4355 sed 's/^/| /' conftest.$ac_ext >&5 4356 4357 eval "$as_ac_Header=no" 4358 fi 4359 4360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4361 fi 4362 ac_res=`eval echo '${'$as_ac_Header'}'` 4363 { echo "$as_me:$LINENO: result: $ac_res" >&5 4364 echo "${ECHO_T}$ac_res" >&6; } 4365 if test `eval echo '${'$as_ac_Header'}'` = yes; then 4366 cat >>confdefs.h <<_ACEOF 4367 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 4368 _ACEOF 4369 4370 fi 4371 4372 done 4373 4374 4375 { echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 4376 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } 4377 if test "${ac_cv_header_stdbool_h+set}" = set; then 4378 echo $ECHO_N "(cached) $ECHO_C" >&6 4379 else 4380 cat >conftest.$ac_ext <<_ACEOF 4381 /* confdefs.h. */ 4382 _ACEOF 4383 cat confdefs.h >>conftest.$ac_ext 4384 cat >>conftest.$ac_ext <<_ACEOF 4385 /* end confdefs.h. */ 4386 4387 #include <stdbool.h> 4388 #ifndef bool 4389 "error: bool is not defined" 4390 #endif 4391 #ifndef false 4392 "error: false is not defined" 4393 #endif 4394 #if false 4395 "error: false is not 0" 4396 #endif 4397 #ifndef true 4398 "error: true is not defined" 4399 #endif 4400 #if true != 1 4401 "error: true is not 1" 4402 #endif 4403 #ifndef __bool_true_false_are_defined 4404 "error: __bool_true_false_are_defined is not defined" 4405 #endif 4406 4407 struct s { _Bool s: 1; _Bool t; } s; 4408 4409 char a[true == 1 ? 1 : -1]; 4410 char b[false == 0 ? 1 : -1]; 4411 char c[__bool_true_false_are_defined == 1 ? 1 : -1]; 4412 char d[(bool) 0.5 == true ? 1 : -1]; 4413 bool e = &s; 4414 char f[(_Bool) 0.0 == false ? 1 : -1]; 4415 char g[true]; 4416 char h[sizeof (_Bool)]; 4417 char i[sizeof s.t]; 4418 enum { j = false, k = true, l = false * true, m = true * 256 }; 4419 _Bool n[m]; 4420 char o[sizeof n == m * sizeof n[0] ? 1 : -1]; 4421 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; 4422 # if defined __xlc__ || defined __GNUC__ 4423 /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 4424 reported by James Lemley on 2005-10-05; see 4425 http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html 4426 This test is not quite right, since xlc is allowed to 4427 reject this program, as the initializer for xlcbug is 4428 not one of the forms that C requires support for. 4429 However, doing the test right would require a runtime 4430 test, and that would make cross-compilation harder. 4431 Let us hope that IBM fixes the xlc bug, and also adds 4432 support for this kind of constant expression. In the 4433 meantime, this test will reject xlc, which is OK, since 4434 our stdbool.h substitute should suffice. We also test 4435 this with GCC, where it should work, to detect more 4436 quickly whether someone messes up the test in the 4437 future. */ 4438 char digs[] = "0123456789"; 4439 int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); 4440 # endif 4441 /* Catch a bug in an HP-UX C compiler. See 4442 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html 4443 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html 4444 */ 4445 _Bool q = true; 4446 _Bool *pq = &q; 4447 4448 int 4449 main () 4450 { 4451 4452 *pq |= q; 4453 *pq |= ! q; 4454 /* Refer to every declared value, to avoid compiler optimizations. */ 4455 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l 4456 + !m + !n + !o + !p + !q + !pq); 4457 4458 ; 4459 return 0; 4460 } 4461 _ACEOF 4462 rm -f conftest.$ac_objext 4463 if { (ac_try="$ac_compile" 4464 case "(($ac_try" in 4465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4466 *) ac_try_echo=$ac_try;; 4467 esac 4468 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4469 (eval "$ac_compile") 2>conftest.er1 4470 ac_status=$? 4471 grep -v '^ *+' conftest.er1 >conftest.err 4472 rm -f conftest.er1 4473 cat conftest.err >&5 4474 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4475 (exit $ac_status); } && 4476 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 4477 { (case "(($ac_try" in 4478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4479 *) ac_try_echo=$ac_try;; 4480 esac 4481 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4482 (eval "$ac_try") 2>&5 4483 ac_status=$? 4484 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4485 (exit $ac_status); }; } && 4486 { ac_try='test -s conftest.$ac_objext' 4487 { (case "(($ac_try" in 4488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4489 *) ac_try_echo=$ac_try;; 4490 esac 4491 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4492 (eval "$ac_try") 2>&5 4493 ac_status=$? 4494 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4495 (exit $ac_status); }; }; then 4496 ac_cv_header_stdbool_h=yes 4497 else 4498 echo "$as_me: failed program was:" >&5 4499 sed 's/^/| /' conftest.$ac_ext >&5 4500 4501 ac_cv_header_stdbool_h=no 4502 fi 4503 4504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4505 fi 4506 { echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 4507 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } 4508 { echo "$as_me:$LINENO: checking for _Bool" >&5 4509 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } 4510 if test "${ac_cv_type__Bool+set}" = set; then 4511 echo $ECHO_N "(cached) $ECHO_C" >&6 4512 else 4513 cat >conftest.$ac_ext <<_ACEOF 4514 /* confdefs.h. */ 4515 _ACEOF 4516 cat confdefs.h >>conftest.$ac_ext 4517 cat >>conftest.$ac_ext <<_ACEOF 4518 /* end confdefs.h. */ 4519 $ac_includes_default 4520 typedef _Bool ac__type_new_; 4521 int 4522 main () 4523 { 4524 if ((ac__type_new_ *) 0) 4525 return 0; 4526 if (sizeof (ac__type_new_)) 4527 return 0; 4528 ; 4529 return 0; 4530 } 4531 _ACEOF 4532 rm -f conftest.$ac_objext 4533 if { (ac_try="$ac_compile" 4534 case "(($ac_try" in 4535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4536 *) ac_try_echo=$ac_try;; 4537 esac 4538 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4539 (eval "$ac_compile") 2>conftest.er1 4540 ac_status=$? 4541 grep -v '^ *+' conftest.er1 >conftest.err 4542 rm -f conftest.er1 4543 cat conftest.err >&5 4544 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4545 (exit $ac_status); } && 4546 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 4547 { (case "(($ac_try" in 4548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4549 *) ac_try_echo=$ac_try;; 4550 esac 4551 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4552 (eval "$ac_try") 2>&5 4553 ac_status=$? 4554 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4555 (exit $ac_status); }; } && 4556 { ac_try='test -s conftest.$ac_objext' 4557 { (case "(($ac_try" in 4558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4559 *) ac_try_echo=$ac_try;; 4560 esac 4561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 4562 (eval "$ac_try") 2>&5 4563 ac_status=$? 4564 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4565 (exit $ac_status); }; }; then 4566 ac_cv_type__Bool=yes 4567 else 4568 echo "$as_me: failed program was:" >&5 4569 sed 's/^/| /' conftest.$ac_ext >&5 4570 4571 ac_cv_type__Bool=no 4572 fi 4573 4574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4575 fi 4576 { echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 4577 echo "${ECHO_T}$ac_cv_type__Bool" >&6; } 4578 if test $ac_cv_type__Bool = yes; then 4579 4580 cat >>confdefs.h <<_ACEOF 4581 #define HAVE__BOOL 1 4582 _ACEOF 4583 4584 4585 fi 4586 4587 if test $ac_cv_header_stdbool_h = yes; then 4588 4589 cat >>confdefs.h <<\_ACEOF 4590 #define HAVE_STDBOOL_H 1 4591 _ACEOF 4592 4593 fi 4594 4100 4595 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 4101 4596 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } … … 4259 4754 4260 4755 fi 4261 4262 # On IRIX 5.3, sys/types and inttypes.h are conflicting.4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \4273 inttypes.h stdint.h unistd.h4274 do4275 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`4276 { echo "$as_me:$LINENO: checking for $ac_header" >&54277 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }4278 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then4279 echo $ECHO_N "(cached) $ECHO_C" >&64280 else4281 cat >conftest.$ac_ext <<_ACEOF4282 /* confdefs.h. */4283 _ACEOF4284 cat confdefs.h >>conftest.$ac_ext4285 cat >>conftest.$ac_ext <<_ACEOF4286 /* end confdefs.h. */4287 $ac_includes_default4288 4289 #include <$ac_header>4290 _ACEOF4291 rm -f conftest.$ac_objext4292 if { (ac_try="$ac_compile"4293 case "(($ac_try" in4294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;4295 *) ac_try_echo=$ac_try;;4296 esac4297 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&54298 (eval "$ac_compile") 2>conftest.er14299 ac_status=$?4300 grep -v '^ *+' conftest.er1 >conftest.err4301 rm -f conftest.er14302 cat conftest.err >&54303 echo "$as_me:$LINENO: \$? = $ac_status" >&54304 (exit $ac_status); } &&4305 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'4306 { (case "(($ac_try" in4307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;4308 *) ac_try_echo=$ac_try;;4309 esac4310 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&54311 (eval "$ac_try") 2>&54312 ac_status=$?4313 echo "$as_me:$LINENO: \$? = $ac_status" >&54314 (exit $ac_status); }; } &&4315 { ac_try='test -s conftest.$ac_objext'4316 { (case "(($ac_try" in4317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;4318 *) ac_try_echo=$ac_try;;4319 esac4320 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&54321 (eval "$ac_try") 2>&54322 ac_status=$?4323 echo "$as_me:$LINENO: \$? = $ac_status" >&54324 (exit $ac_status); }; }; then4325 eval "$as_ac_Header=yes"4326 else4327 echo "$as_me: failed program was:" >&54328 sed 's/^/| /' conftest.$ac_ext >&54329 4330 eval "$as_ac_Header=no"4331 fi4332 4333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext4334 fi4335 ac_res=`eval echo '${'$as_ac_Header'}'`4336 { echo "$as_me:$LINENO: result: $ac_res" >&54337 echo "${ECHO_T}$ac_res" >&6; }4338 if test `eval echo '${'$as_ac_Header'}'` = yes; then4339 cat >>confdefs.h <<_ACEOF4340 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 14341 _ACEOF4342 4343 fi4344 4345 done4346 4347 4756 4348 4757 if test "${ac_cv_header_sys_time_h+set}" = set; then … … 7331 7740 7332 7741 7333 for ac_header in sys/un.h ieeefp.h 7742 7743 for ac_header in sys/un.h ieeefp.h sys/resource.h 7334 7744 do 7335 7745 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 9853 10263 9854 10264 9855 9856 9857 10265 ### Functions 9858 10266 { echo "$as_me:$LINENO: checking for bindtextdomain" >&5 … … 11520 11928 fi 11521 11929 11522 { echo "$as_me:$LINENO: checking for setpgrp" >&5 11523 echo $ECHO_N "checking for setpgrp... $ECHO_C" >&6; } 11524 if test "${ac_cv_func_setpgrp+set}" = set; then 11930 11931 11932 11933 11934 for ac_func in fork setsid setpgid setpgrp 11935 do 11936 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 11937 { echo "$as_me:$LINENO: checking for $ac_func" >&5 11938 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 11939 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 11525 11940 echo $ECHO_N "(cached) $ECHO_C" >&6 11526 11941 else … … 11531 11946 cat >>conftest.$ac_ext <<_ACEOF 11532 11947 /* end confdefs.h. */ 11533 /* Define setpgrp to an innocuous variant, in case <limits.h> declares setpgrp.11948 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. 11534 11949 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 11535 #define setpgrp innocuous_setpgrp11950 #define $ac_func innocuous_$ac_func 11536 11951 11537 11952 /* System header to define __stub macros and hopefully few prototypes, 11538 which can conflict with char setpgrp(); below.11953 which can conflict with char $ac_func (); below. 11539 11954 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 11540 11955 <limits.h> exists even on freestanding compilers. */ … … 11546 11961 #endif 11547 11962 11548 #undef setpgrp11963 #undef $ac_func 11549 11964 11550 11965 /* Override any GCC internal prototype to avoid an error. … … 11554 11969 extern "C" 11555 11970 #endif 11556 char setpgrp();11971 char $ac_func (); 11557 11972 /* The GNU C library defines this for functions which it implements 11558 11973 to always fail with ENOSYS. Some functions are actually named 11559 11974 something starting with __ and the normal name is an alias. */ 11560 #if defined __stub_ setpgrp || defined __stub___setpgrp11975 #if defined __stub_$ac_func || defined __stub___$ac_func 11561 11976 choke me 11562 11977 #endif … … 11565 11980 main () 11566 11981 { 11567 return setpgrp();11982 return $ac_func (); 11568 11983 ; 11569 11984 return 0; … … 11604 12019 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11605 12020 (exit $ac_status); }; }; then 11606 ac_cv_func_setpgrp=yes12021 eval "$as_ac_var=yes" 11607 12022 else 11608 12023 echo "$as_me: failed program was:" >&5 11609 12024 sed 's/^/| /' conftest.$ac_ext >&5 11610 12025 11611 ac_cv_func_setpgrp=no12026 eval "$as_ac_var=no" 11612 12027 fi 11613 12028 … … 11615 12030 conftest$ac_exeext conftest.$ac_ext 11616 12031 fi 11617 { echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp" >&5 11618 echo "${ECHO_T}$ac_cv_func_setpgrp" >&6; } 12032 ac_res=`eval echo '${'$as_ac_var'}'` 12033 { echo "$as_me:$LINENO: result: $ac_res" >&5 12034 echo "${ECHO_T}$ac_res" >&6; } 12035 if test `eval echo '${'$as_ac_var'}'` = yes; then 12036 cat >>confdefs.h <<_ACEOF 12037 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 12038 _ACEOF 12039 12040 fi 12041 done 12042 11619 12043 if test $ac_cv_func_setpgrp = yes; then 11620 cat >>confdefs.h <<\_ACEOF11621 #define HAS_SETPGRP 111622 _ACEOF11623 11624 fi11625 11626 12044 { echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 11627 12045 echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; } … … 11696 12114 fi 11697 12115 12116 fi 11698 12117 11699 12118 1.8.3/branches/experimental/configure.in
r857 r878 14 14 AC_PATH_PROG(CAT, cat) 15 15 AC_PROG_CC 16 AC_PROG_CC_C99 16 17 AC_PATH_PROG(CHMOD, chmod) 17 18 AC_PATH_PROG(CP, cp) … … 57 58 # <stdint.h> is checked by this. 58 59 AC_HEADER_STDC 60 AC_HEADER_STDBOOL 59 61 AC_HEADER_SYS_WAIT 60 62 AC_HEADER_TIME … … 78 80 AC_CHECK_HEADER(sys/stat.h, [AC_DEFINE(I_SYS_STAT)]) 79 81 AC_CHECK_HEADER(sys/types.h, [AC_DEFINE(I_SYS_TYPES)]) 80 AC_CHECK_HEADERS([sys/un.h ieeefp.h ])82 AC_CHECK_HEADERS([sys/un.h ieeefp.h sys/resource.h]) 81 83 82 84 ### C language support … … 118 120 AX_LIB_POSTGRESQL() 119 121 AX_LIB_SQLITE3() 120 121 122 122 123 123 ### Functions … … 138 138 AC_CHECK_FUNC(setitimer, [AC_DEFINE(HAS_ITIMER)]) 139 139 AC_CHECK_FUNC(setlocale, [AC_DEFINE(HAS_SETLOCALE)]) 140 AC_CHECK_FUNC(setpgrp, [AC_DEFINE(HAS_SETPGRP)]) 140 AC_CHECK_FUNCS(fork setsid setpgid setpgrp) 141 if test $ac_cv_func_setpgrp = yes; then 141 142 AC_FUNC_SETPGRP 143 fi 142 144 AC_CHECK_FUNCS(cbrt getuid geteuid seteuid getpriority setpriority socketpair) 143 145 AC_CHECK_FUNC(sigaction, [AC_DEFINE(HAS_SIGACTION)]) 1.8.3/branches/experimental/game/txt/hlp/pennfunc.hlp
r783 r878 3877 3877 &DOIT obj = $do *: ... [setq(0,sql(u(SEL_GETID,%0),~,|))] ... 3878 3878 3879 A query that doesn't return any rows, such as a UPDATE or SELECT that 3880 has no matches will return a null string. 3881 3879 3882 See also: sqlescape(), mapsql(), @sql 3880 3883 … … 3885 3888 It's important to escape arbitrary data before passing it to the 3886 3889 sql() function or @sql command to prevent SQL injection attacks. 3890 3891 If using a Sqlite3 database, the game must also have MySQL support 3892 compiled into the mush to use this function, since Sqlite3 does 3893 not provide a way to do this. 3887 3894 3888 3895 Example: 1.8.3/branches/experimental/hdrs/atr_tab.h
r681 r878 68 68 {"FOLLOW", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 69 69 70 {"FOLLOWING", AF_NOPROG | AF_PRIVATE | AF_WIZARD | AF_NOCOPY ,71 NULL_CHUNK_REFERENCE, 0 | AF_PREFIXMATCH, NULL},72 {"FOLLOWERS", AF_NOPROG | AF_PRIVATE | AF_WIZARD | AF_NOCOPY ,73 NULL_CHUNK_REFERENCE, 0 | AF_PREFIXMATCH, NULL},70 {"FOLLOWING", AF_NOPROG | AF_PRIVATE | AF_WIZARD | AF_NOCOPY | AF_PREFIXMATCH, 71 NULL_CHUNK_REFERENCE, 0, NULL}, 72 {"FOLLOWERS", AF_NOPROG | AF_PRIVATE | AF_WIZARD | AF_NOCOPY | AF_PREFIXMATCH, 73 NULL_CHUNK_REFERENCE, 0, NULL}, 74 74 {"FORWARDLIST", AF_NOPROG | AF_PRIVATE | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 75 75 0, NULL}, 1.8.3/branches/experimental/hdrs/attrib.h
r817 r878 81 81 extern void do_atrlock(dbref player, char const *arg1, char const *arg2); 82 82 extern void do_atrchown(dbref player, char const *arg1, char const *arg2); 83 extern int string_to_atrflag(dbref player, const char *p);84 extern int string_to_atrflagsets(dbref player, const char *p, int*setbits,85 int*clrbits);86 extern const char *atrflag_to_string( intmask);83 int string_to_atrflag(dbref player, const char *p, privbits *bits); 84 int string_to_atrflagsets(dbref player, const char *p, privbits *setbits, 85 privbits *clrbits); 86 extern const char *atrflag_to_string(privbits mask); 87 87 extern void init_atr_name_tree(void); 88 88 … … 97 97 98 98 /* possible attribute flags */ 99 #define AF_ODARK 0x1 /**< OBSOLETE! Leave here but don't use */100 #define AF_INTERNAL 0x2 /**< no one can see it or set it */101 #define AF_WIZARD 0x4 /**< Wizard only can change it */102 #define AF_NUKED 0x8 /**< OBSOLETE! Leave here but don't use */103 #define AF_LOCKED 0x10 /**< Only creator of attrib can change it. */104 #define AF_NOPROG 0x20 /**< won't be searched for $ commands. */105 #define AF_MDARK 0x40 /**< Only wizards can see it */106 #define AF_PRIVATE 0x80 /**< Children don't inherit it */107 #define AF_NOCOPY 0x100 /**< atr_cpy (for @clone) doesn't copy it */108 #define AF_VISUAL 0x200 /**< Everyone can see this attribute */109 #define AF_REGEXP 0x400 /**< Match $/^ patterns using regexps */110 #define AF_CASE 0x800 /**< Match $/^ patterns case-sensitive */111 #define AF_SAFE 0x1000 /**< This attribute may not be modified */112 #define AF_ROOT 0x2000 /**< Root of an attribute tree */113 #define AF_UNDEF1 0x4000 /**< Undefined; reserved for a future flag */114 #define AF_UNDEF2 0x8000 /**< Undefined; reserved for a future flag */115 #define AF_STATIC 0x10000 /**< OBSOLETE! Leave here but don't use */116 #define AF_COMMAND 0x20000 /**< INTERNAL: value starts with $ */117 #define AF_LISTEN 0x40000 /**< INTERNAL: value starts with ^ */118 #define AF_NODUMP 0x80000 /**< INTERNAL: attribute is not saved */119 #define AF_LISTED 0x100000 /**< INTERNAL: Used in @list attribs */120 #define AF_PREFIXMATCH 0x200000 /**< Subject to prefix-matching */121 #define AF_VEILED 0x400000 /**< On ex, show presence, not value */122 #define AF_DEBUG 0x800000 /**< Show debug when evaluated */123 #define AF_NEARBY 0x1000000 /**< Override AF_VISUAL if remote */124 #define AF_PUBLIC 0x2000000 /**< Override SAFER_UFUN */125 #define AF_ANON 0x4000000 /**< INTERNAL: Attribute doesn't really99 #define AF_ODARK 0x1U /**< OBSOLETE! Leave here but don't use */ 100 #define AF_INTERNAL 0x2U /**< no one can see it or set it */ 101 #define AF_WIZARD 0x4U /**< Wizard only can change it */ 102 #define AF_NUKED 0x8U /**< OBSOLETE! Leave here but don't use */ 103 #define AF_LOCKED 0x10U /**< Only creator of attrib can change it. */ 104 #define AF_NOPROG 0x20U /**< won't be searched for $ commands. */ 105 #define AF_MDARK 0x40U /**< Only wizards can see it */ 106 #define AF_PRIVATE 0x80U /**< Children don't inherit it */ 107 #define AF_NOCOPY 0x100U /**< atr_cpy (for @clone) doesn't copy it */ 108 #define AF_VISUAL 0x200U /**< Everyone can see this attribute */ 109 #define AF_REGEXP 0x400U /**< Match $/^ patterns using regexps */ 110 #define AF_CASE 0x800U /**< Match $/^ patterns case-sensitive */ 111 #define AF_SAFE 0x1000U /**< This attribute may not be modified */ 112 #define AF_ROOT 0x2000U /**< Root of an attribute tree */ 113 #define AF_UNDEF1 0x4000U /**< Undefined; reserved for a future flag */ 114 #define AF_UNDEF2 0x8000U /**< Undefined; reserved for a future flag */ 115 #define AF_STATIC 0x10000U /**< OBSOLETE! Leave here but don't use */ 116 #define AF_COMMAND 0x20000U /**< INTERNAL: value starts with $ */ 117 #define AF_LISTEN 0x40000U /**< INTERNAL: value starts with ^ */ 118 #define AF_NODUMP 0x80000U /**< INTERNAL: attribute is not saved */ 119 #define AF_LISTED 0x100000U /**< INTERNAL: Used in @list attribs */ 120 #define AF_PREFIXMATCH 0x200000U /**< Subject to prefix-matching */ 121 #define AF_VEILED 0x400000U /**< On ex, show presence, not value */ 122 #define AF_DEBUG 0x800000U /**< Show debug when evaluated */ 123 #define AF_NEARBY 0x1000000U /**< Override AF_VISUAL if remote */ 124 #define AF_PUBLIC 0x2000000U /**< Override SAFER_UFUN */ 125 #define AF_ANON 0x4000000U /**< INTERNAL: Attribute doesn't really 126 126 exist in the database */ 127 #define AF_NONAME 0x8000000 /**< No name in did_it */128 #define AF_NOSPACE 0x10000000 /**< No space in did_it */129 #define AF_MHEAR 0x20000000 /**< ^-listens can be triggered by %! */130 #define AF_AHEAR 0x40000000 /**< ^-listens can be triggered by anyone */131 #define AF_UNDEF3 0x80000000 /**< Undefined; reserved for a future flag */127 #define AF_NONAME 0x8000000U /**< No name in did_it */ 128 #define AF_NOSPACE 0x10000000U /**< No space in did_it */ 129 #define AF_MHEAR 0x20000000U /**< ^-listens can be triggered by %! */ 130 #define AF_AHEAR 0x40000000U /**< ^-listens can be triggered by anyone */ 131 #define AF_UNDEF3 0x80000000U /**< Undefined; reserved for a future flag */ 132 132 133 #define AF_MAXVALUE 0x100000000 /**< Largest attribute flag value. */133 #define AF_MAXVALUE 0x100000000U /**< Largest attribute flag value. */ 134 134 135 135 extern ATTR attr[]; 1.8.3/branches/experimental/hdrs/externs.h
r836 r878 401 401 extern char *split_token(char **sp, char sep); 402 402 extern char *chopstr(const char *str, size_t lim); 403 extern int string_prefix(const char * RESTRICTstring,404 const char *
