viewing paste ra_updquickfix | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917
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 <name id>.W <amount>.W <kafra points>.L (PACKETVER >= 20070711)
 /// 0288 <packet len>.W <kafra points>.L <count>.W { <amount>.W <name id>.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 <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+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 <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+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
 
Viewed 1524 times, submitted by lighta.