Index: src/map/mob.c =================================================================== --- src/map/mob.c (revision 17341) +++ src/map/mob.c (working copy) @@ -2094,7 +2094,6 @@ struct status_data *status; struct map_session_data *sd = NULL, *tmpsd[DAMAGELOG_SIZE]; struct map_session_data *mvp_sd = NULL, *second_sd = NULL, *third_sd = NULL; - struct status_change *sc; struct { struct party_data *p; @@ -2107,7 +2106,6 @@ bool rebirth, homkillonly; status = &md->status; - sc = &md->sc; if( src && src->type == BL_PC ) { sd = (struct map_session_data *)src; Index: src/map/status.c =================================================================== --- src/map/status.c (revision 17341) +++ src/map/status.c (working copy) @@ -2685,7 +2685,7 @@ sd->left_weapon.atkmods[1] = atkmods[1][sd->weapontype2]; sd->left_weapon.atkmods[2] = atkmods[2][sd->weapontype2]; - if(pc_isriding(sd) || pc_isridingdragon(sd) && + if((pc_isriding(sd) || pc_isridingdragon(sd)) && (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR)) { //When Riding with spear, damage modifier to mid-class becomes //same as versus large size. @@ -2693,7 +2693,7 @@ sd->left_weapon.atkmods[1] = sd->left_weapon.atkmods[2]; } -// ----- STATS CALCULATION ----- + // ----- STATS CALCULATION ----- // Job bonuses index = pc_class2idx(sd->status.class_); Index: src/map/atcommand.c =================================================================== --- src/map/atcommand.c (revision 17341) +++ src/map/atcommand.c (working copy) @@ -537,8 +537,7 @@ * Display list of online characters with * various info. *------------------------------------------*/ -ACMD_FUNC(who) -{ +ACMD_FUNC(who) { struct map_session_data *pl_sd = NULL; struct s_mapiterator *iter = NULL; char map_name[MAP_NAME_LENGTH_EXT] = ""; @@ -7781,7 +7780,7 @@ struct map_session_data *target_sd; target_sd = map_nick2sd((char *)message); if(target_sd != NULL) { - unsigned int maxpl=0, newduel; + unsigned int newduel; if((newduel = duel_create(sd, 2)) != -1) { if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) { clif_displaymessage(fd, msg_txt(sd,353)); // "Duel: Player already in duel." Index: src/map/unit.c =================================================================== --- src/map/unit.c (revision 17341) +++ src/map/unit.c (working copy) @@ -171,7 +171,7 @@ if(msd){ //if there is a master int *msd_tid = unit_get_masterteleport_timer(sbl); - if (!check_distance_bl(&msd->bl, sbl, MAX_MER_DISTANCE)) { + if (!check_distance_bl(&msd->bl, sbl, max_dist)) { if(*msd_tid == INVALID_TIMER || *msd_tid == 0) *msd_tid = add_timer(gettick()+3000,unit_teleport_timer,sbl->id,BL_MER); } Index: src/map/pc.c =================================================================== --- src/map/pc.c (revision 17341) +++ src/map/pc.c (working copy) @@ -6568,7 +6568,7 @@ sd->canlog_tick = gettick(); } -static int pc_close_npc_timer(int tid, unsigned int tick, int id, intptr_t data) +int pc_close_npc_timer(int tid, unsigned int tick, int id, intptr_t data) { TBL_PC *sd = map_id2sd(id); if(sd) pc_close_npc(sd,data); @@ -7339,13 +7339,11 @@ { nullpo_ret(sd); - if(hp > 100) hp = 100; - else - if(hp <-100) hp =-100; + if (hp > 100) hp = 100; + else if (hp <-100) hp = -100; - if(sp > 100) sp = 100; - else - if(sp <-100) sp =-100; + if (sp > 100) sp = 100; + else if (sp <-100) sp = -100; if(hp >= 0 && sp >= 0) //Heal return status_percent_heal(&sd->bl, hp, sp); Index: src/map/pc.h =================================================================== --- src/map/pc.h (revision 17341) +++ src/map/pc.h (working copy) @@ -718,7 +718,7 @@ void pc_authfail(struct map_session_data *); int pc_reg_received(struct map_session_data *sd); void pc_close_npc(struct map_session_data *sd,int flag); -static int pc_close_npc_timer(int tid, unsigned int tick, int id, intptr_t data); +int pc_close_npc_timer(int tid, unsigned int tick, int id, intptr_t data); int pc_isequip(struct map_session_data *sd,int n); int pc_equippoint(struct map_session_data *sd,int n); Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 17341) +++ src/map/clif.c (working copy) @@ -14394,30 +14394,30 @@ /// 0288 .W .W .L (PACKETVER >= 20070711) /// 0288 .W .L .W { .W .W }.4B*count (PACKETVER >= 20100803) void clif_parse_cashshop_buy(int fd, struct map_session_data *sd){ - int fail = 0; - nullpo_retv(sd); + int fail = 0; + nullpo_retv(sd); if( sd->state.trading || !sd->npc_shopid ) fail = 1; else { #if PACKETVER < 20101116 - short nameid = RFIFOW(fd,2); - short amount = RFIFOW(fd,4); - int points = RFIFOL(fd,6); + short nameid = RFIFOW(fd,2); + short amount = RFIFOW(fd,4); + int points = RFIFOL(fd,6); - fail = npc_cashshop_buy(sd, nameid, amount, points); + fail = npc_cashshop_buy(sd, nameid, amount, points); #else - int len = RFIFOW(fd,2); - int points = RFIFOL(fd,4); - int count = RFIFOW(fd,8); - unsigned short* item_list = (unsigned short*)RFIFOP(fd,10); + int len = RFIFOW(fd,2); + int points = RFIFOL(fd,4); + int count = RFIFOW(fd,8); + unsigned short* item_list = (unsigned short*)RFIFOP(fd,10); - if( len < 10 || len != 10 + count * 4) - { - ShowWarning("Player %u sent incorrect cash shop buy packet (len %u:%u)!\n", sd->status.char_id, len, 10 + count * 4); - return; - } - fail = npc_cashshop_buylist(sd,points,count,item_list); + if( len < 10 || len != 10 + count * 4) + { + ShowWarning("Player %u sent incorrect cash shop buy packet (len %u:%u)!\n", sd->status.char_id, len, 10 + count * 4); + return; + } + fail = npc_cashshop_buylist(sd,points,count,item_list); #endif } Index: src/map/skill.c =================================================================== --- src/map/skill.c (revision 17341) +++ src/map/skill.c (working copy) @@ -2473,8 +2473,9 @@ skill_id == MER_INCAGI || skill_id == MER_BLESSING) && tsd->sc.data[SC_CHANGEUNDEAD] ) damage = 1; - if( damage > 0 && (( dmg.flag&BF_WEAPON && src != bl && ( src == dsrc || ( dsrc->type == BL_SKILL && ( skill_id == SG_SUN_WARM || skill_id == SG_MOON_WARM || skill_id == SG_STAR_WARM ) ) )) - || ((sc && sc->data[SC_REFLECTDAMAGE]) && !dmg.flag&(BF_MAGIC|BF_LONG) && !skill_get_inf2(skill_id)&INF2_TRAP)) ) + if( damage > 0 && (( dmg.flag&BF_WEAPON && src != bl && ( src == dsrc || ( dsrc->type == BL_SKILL && + ( skill_id == SG_SUN_WARM || skill_id == SG_MOON_WARM || skill_id == SG_STAR_WARM ) ) )) + || ((sc && sc->data[SC_REFLECTDAMAGE]) && !(dmg.flag&(BF_MAGIC|BF_LONG)) && !(skill_get_inf2(skill_id)&INF2_TRAP)) ) ) rdamage = battle_calc_return_damage(bl,src, &damage, dmg.flag, skill_id); if( damage && sc && sc->data[SC_GENSOU] && dmg.flag&BF_MAGIC ){ @@ -9234,7 +9235,6 @@ if(sce->val1 == MH_MD_FIGHTING) sce->val1 = MH_MD_GRAPPLING; else sce->val1 = MH_MD_FIGHTING; if(hd->master && hd->sc.data[SC_STYLE_CHANGE]) { - int mode = hd->sc.data[SC_STYLE_CHANGE]->val1; char output[128]; safesnprintf(output,sizeof(output),msg_txt(sd,378),(sce->val1==MH_MD_FIGHTING?"fighthing":"grappling")); clif_colormes(hd->master,color_table[COLOR_RED],output); Index: src/map/battle.c =================================================================== --- src/map/battle.c (revision 17341) +++ src/map/battle.c (working copy) @@ -801,7 +801,7 @@ if( sc->data[SC_SAFETYWALL] && (flag&(BF_SHORT|BF_MAGIC))==BF_SHORT ) { struct skill_unit_group* group = skill_id2group(sc->data[SC_SAFETYWALL]->val3); - uint16 skill_id = sc->data[SC_SAFETYWALL]->val2; + //uint16 skill_id = sc->data[SC_SAFETYWALL]->val2; (safetywall or steinwand) if (group) { //in RE, SW possesses a lifetime equal to group val2, (3x caster hp, or homon formula) #ifdef RENEWAL Index: src/map/channel.c =================================================================== --- src/map/channel.c (revision 17341) +++ src/map/channel.c (working copy) @@ -1107,8 +1107,6 @@ config_setting_t *channel = config_setting_get_elem(channels, i); const char *color = config_setting_get_string_elem(channels,i); char *name = config_setting_name(channel); - struct Channel *chd; - for (k = 0; k < Channel_Config.colors_count; k++) { if( strcmpi(Channel_Config.colors_name[k],color) == 0 ) break; @@ -1121,7 +1119,7 @@ ShowError("channels.conf: duplicate channel '%s', skipping channel...\n",name); continue; } - chd = channel_create(name,NULL,k,CHAN_TYPE_PUBLIC,0); + channel_create(name,NULL,k,CHAN_TYPE_PUBLIC,0); } } Index: src/map/intif.c =================================================================== --- src/map/intif.c (revision 17341) +++ src/map/intif.c (working copy) @@ -2235,11 +2235,11 @@ case 0x3854: intif_parse_Auction_message(fd); break; case 0x3855: intif_parse_Auction_bid(fd); break; -// Mercenary System + // Mercenary System case 0x3870: intif_parse_mercenary_received(fd); break; case 0x3871: intif_parse_mercenary_deleted(fd); break; case 0x3872: intif_parse_mercenary_saved(fd); break; -// Elemental System + // Elemental System case 0x387c: intif_parse_elemental_received(fd); break; case 0x387d: intif_parse_elemental_deleted(fd); break; case 0x387e: intif_parse_elemental_saved(fd); break; @@ -2256,7 +2256,7 @@ ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0)); return 0; } - // Skip packet + // Skip packet RFIFOSKIP(fd,packet_len); return 1; } Index: src/char/char.c =================================================================== --- src/char/char.c (revision 17341) +++ src/char/char.c (working copy) @@ -1926,7 +1926,7 @@ WFIFOHEAD(fd, 6); WFIFOW(fd, 0) = 0x9a0; // pages to req / send them all in 1 until mmo_chars_fromsql can split them up - WFIFOL(fd, 2) = 1; //int TotalCnt + WFIFOL(fd, 2) = (sd->char_slots>3)?sd->char_slots/3:1; //int TotalCnt (nb page to load) WFIFOSET(fd,6); } @@ -3303,7 +3303,6 @@ case 0x2b11: if( RFIFOREST(fd) < 10 ) return 0; - divorce_char_sql(RFIFOL(fd,2), RFIFOL(fd,6)); RFIFOSKIP(fd,10); break; @@ -4388,7 +4387,6 @@ break; case 0x9a1: - ShowInfo("We are here in 9a1\n"); if( RFIFOREST(fd) < 2 ) return 0; char_parse_req_charlist(fd,sd); Index: configure =================================================================== --- configure (revision 17341) +++ configure (working copy) @@ -1,12 +1,10 @@ #! /bin/sh -# From configure.in Revision: 17159 . +# From configure.in Revision: 17181 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -135,6 +133,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -168,7 +191,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -213,21 +237,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -329,6 +357,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -450,6 +486,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -484,16 +524,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -505,28 +545,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -669,6 +689,7 @@ enable_manager enable_packetver enable_debug +enable_warn enable_buildbot enable_rdtsc enable_profiler @@ -1145,8 +1166,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1305,6 +1324,8 @@ src/map/clif.h) --enable-debug[=ARG] Compiles extra debug code. (disabled by default) (available options: yes, no, gdb) + --enable-warn[=ARG] Compiles with warnings. (disabled by default) + (available options: yes, no) --enable-buildbot[=ARG] (available options: yes, no) --enable-rdtsc Uses rdtsc as timing source (disabled by default) Enable it when you've timing issues. (For example: @@ -1415,9 +1436,9 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1690,7 +1711,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1780,7 +1801,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2163,7 +2184,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2203,7 +2224,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2256,7 +2277,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2297,7 +2318,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2355,7 +2376,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2399,7 +2420,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2845,8 +2866,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3086,7 +3106,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3152,7 +3172,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3359,8 +3379,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -3450,6 +3470,25 @@ # +# warn +# +# Check whether --enable-warn was given. +if test "${enable_warn+set}" = set; then : + enableval=$enable_warn; + enable_warn="$enableval" + case $enableval in + "no");; + "yes");; + *) as_fn_error $? "invalid argument --enable-warn=$enableval... stopping" "$LINENO" 5;; + esac + +else + enable_warn="no" + +fi + + +# # Buildbot # # Check whether --enable-buildbot was given. @@ -3729,7 +3768,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3769,7 +3808,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3822,7 +3861,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3863,7 +3902,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3921,7 +3960,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3965,7 +4004,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4161,8 +4200,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4402,7 +4440,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5119,10 +5157,10 @@ case $enable_debug in "no") # default value - CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses $PROD_WARN" + CFLAGS="$CFLAGS" ;; "yes") - CFLAGS="$CFLAGS -g -DDEBUG -Wconversion" + CFLAGS="$CFLAGS -g -DDEBUG" ;; "gdb") CFLAGS="$CFLAGS -ggdb -DDEBUG" @@ -5130,6 +5168,18 @@ esac # +# Warnings +# +case $enable_warn in + "no") #default + CFLAGS="$CFLAGS $PROD_WARN" + ;; + "yes") + CFLAGS="$CFLAGS" + ;; +esac + +# # Buildbot # case $enable_buildbot in @@ -5768,7 +5818,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MYSQL_CONFIG_HOME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6518,16 +6568,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -6587,29 +6637,17 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -6630,7 +6668,7 @@ # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6683,10 +6721,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -6763,7 +6801,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' Index: configure.in =================================================================== --- configure.in (revision 17341) +++ configure.in (working copy) @@ -77,6 +77,29 @@ ) # +# warn +# +AC_ARG_ENABLE( + [warn], + AC_HELP_STRING( + [--enable-warn@<:@=ARG@:>@], + [ + Compiles with warnings. (disabled by default) + (available options: yes, no) + ] + ), + [ + enable_warn="$enableval" + case $enableval in + "no");; + "yes");; + *) AC_MSG_ERROR([[invalid argument --enable-warn=$enableval... stopping]]);; + esac + ], + [enable_warn="no"] +) + +# # Buildbot # AC_ARG_ENABLE( @@ -605,10 +628,10 @@ case $enable_debug in "no") # default value - CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses $PROD_WARN" + CFLAGS="$CFLAGS" ;; "yes") - CFLAGS="$CFLAGS -g -DDEBUG -Wconversion" + CFLAGS="$CFLAGS -g -DDEBUG" ;; "gdb") CFLAGS="$CFLAGS -ggdb -DDEBUG" @@ -616,6 +639,18 @@ esac # +# Warnings +# +case $enable_warn in + "no") #default + CFLAGS="$CFLAGS $PROD_WARN" + ;; + "yes") + CFLAGS="$CFLAGS" + ;; +esac + +# # Buildbot # case $enable_buildbot in