[Freeciv-Dev] (PR#40633) [Patch] Border radius property for bases
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40633 Currently bases have only ClaimTerritory flag indicating if they should claim territory or not. Hardcoded border radius of 5 is used for all bases that do. Attached patch replaces ClaimTerritory flag with border radius property for each base. In the process civ1 civ2 rulesets are fixed so that their fortress has no territory claiming properties. Applies on top of #40631 - ML diff -Nurd -X.diff_ignore freeciv/client/packhand.c freeciv/client/packhand.c --- freeciv/client/packhand.c 2009-01-07 15:45:57.0 +0200 +++ freeciv/client/packhand.c 2009-01-07 15:54:17.0 +0200 @@ -2909,6 +2909,7 @@ pbase-gui_type = p-gui_type; pbase-build_time = p-build_time; + pbase-border_sq = p-border_sq; pbase-flags = p-flags; diff -Nurd -X.diff_ignore freeciv/common/base.c freeciv/common/base.c --- freeciv/common/base.c 2008-10-27 04:13:30.0 +0200 +++ freeciv/common/base.c 2009-01-07 16:03:16.0 +0200 @@ -32,7 +32,7 @@ static const char *base_type_flag_names[] = { NoAggressive, DefenseBonus, NoStackDeath, - ClaimTerritory, DiplomatDefense, ParadropFrom + DiplomatDefense, ParadropFrom }; /* This must correspond to enum base_gui_type in base.h */ @@ -302,3 +302,11 @@ return !BV_ISSET(base1-conflicts, base_index(base2)); } + +/** + Does this base type claim territory? +**/ +bool territory_claiming_base(const struct base_type *pbase) +{ + return pbase-border_sq 0; +} diff -Nurd -X.diff_ignore freeciv/common/base.h freeciv/common/base.h --- freeciv/common/base.h 2008-10-27 04:13:30.0 +0200 +++ freeciv/common/base.h 2009-01-07 16:03:31.0 +0200 @@ -29,7 +29,6 @@ * if base is close to city */ BF_DEFENSE_BONUS, /* Base provides defense bonus for units inside */ BF_NO_STACK_DEATH, /* Units inside will not die all at once */ - BF_CLAIM_TERRITORY,/* Base claims tile ownership */ BF_DIPLOMAT_DEFENSE, /* Base provides bonus for defending diplomat */ BF_PARADROP_FROM, /* Paratroopers can use base for paradrop */ BF_LAST/* This has to be last */ @@ -47,6 +46,7 @@ struct requirement_vector reqs; enum base_gui_type gui_type; int build_time; + int border_sq; bv_unit_classes native_to; bv_base_flags flags; @@ -91,6 +91,8 @@ bool can_bases_coexist(const struct base_type *base1, const struct base_type *base2); +bool territory_claiming_base(const struct base_type *pbase); + /* Initialization and iteration */ void base_types_init(void); void base_types_free(void); diff -Nurd -X.diff_ignore freeciv/common/borders.c freeciv/common/borders.c --- freeciv/common/borders.c2009-01-07 15:59:31.0 +0200 +++ freeciv/common/borders.c2009-01-07 16:04:50.0 +0200 @@ -47,8 +47,8 @@ radius_sq += pcity-size * game.info.border_size_effect; } else { base_type_iterate(pbase) { - if (tile_has_base(ptile, pbase) base_has_flag(pbase, BF_CLAIM_TERRITORY)) { -radius_sq = 5; + if (tile_has_base(ptile, pbase) territory_claiming_base(pbase)) { +radius_sq = pbase-border_sq; break; } } base_type_iterate_end; @@ -68,7 +68,7 @@ if (tile_owner(ptile) != NULL) { base_type_iterate(pbase) { - if (tile_has_base(ptile, pbase) base_has_flag(pbase, BF_CLAIM_TERRITORY)) { + if (tile_has_base(ptile, pbase) territory_claiming_base(pbase)) { return TRUE; } } base_type_iterate_end; diff -Nurd -X.diff_ignore freeciv/common/packets.def freeciv/common/packets.def --- freeciv/common/packets.def 2009-01-07 15:59:31.0 +0200 +++ freeciv/common/packets.def 2009-01-07 15:53:54.0 +0200 @@ -1318,6 +1318,7 @@ BASE_GUI gui_type; BV_UNIT_CLASSES native_to; UINT8 build_time; + UINT8 border_sq; BV_BASE_FLAGS flags; end diff -Nurd -X.diff_ignore freeciv/common/tile.c freeciv/common/tile.c --- freeciv/common/tile.c 2009-01-07 15:45:57.0 +0200 +++ freeciv/common/tile.c 2009-01-07 16:09:56.0 +0200 @@ -230,6 +230,23 @@ } / + Check if tile contains base providing effect for unit +/ +bool tile_has_claimable_base(const struct tile *ptile, + const struct unit_type *punittype) +{ + base_type_iterate(pbase) { +if (tile_has_base(ptile, pbase) + territory_claiming_base(pbase) + is_native_base_to_uclass(pbase, utype_class(punittype))) { + return TRUE; +} + } base_type_iterate_end; + + return FALSE; +} + +/ Check if tile
[Freeciv-Dev] (PR#40634) [Patch] Defense bonus property for bases
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40634 This patch adds separate defense_bonus value for each base type. DefenseBonus flag is removed and so is global definition of fortress_defense_bonus. If several bases at the same tile provide defense bonus for unit, sum of these is used (usually ruleset author would not allow such bases to coexist). Applies on top of #40633 - ML diff -Nurd -X.diff_ignore freeciv/common/base.c freeciv/common/base.c --- freeciv/common/base.c 2009-01-07 16:53:30.0 +0200 +++ freeciv/common/base.c 2009-01-07 16:37:15.0 +0200 @@ -31,7 +31,7 @@ static struct base_type base_types[MAX_BASE_TYPES]; static const char *base_type_flag_names[] = { - NoAggressive, DefenseBonus, NoStackDeath, + NoAggressive, NoStackDeath, DiplomatDefense, ParadropFrom }; diff -Nurd -X.diff_ignore freeciv/common/base.h freeciv/common/base.h --- freeciv/common/base.h 2009-01-07 16:53:30.0 +0200 +++ freeciv/common/base.h 2009-01-07 16:37:01.0 +0200 @@ -27,7 +27,6 @@ enum base_flag_id { BF_NOT_AGGRESSIVE = 0, /* Unit inside are not considered aggressive * if base is close to city */ - BF_DEFENSE_BONUS, /* Base provides defense bonus for units inside */ BF_NO_STACK_DEATH, /* Units inside will not die all at once */ BF_DIPLOMAT_DEFENSE, /* Base provides bonus for defending diplomat */ BF_PARADROP_FROM, /* Paratroopers can use base for paradrop */ @@ -46,6 +45,7 @@ struct requirement_vector reqs; enum base_gui_type gui_type; int build_time; + int defense_bonus; int border_sq; bv_unit_classes native_to; diff -Nurd -X.diff_ignore freeciv/common/combat.c freeciv/common/combat.c --- freeciv/common/combat.c 2008-12-28 14:53:33.0 +0200 +++ freeciv/common/combat.c 2009-01-07 16:44:19.0 +0200 @@ -467,9 +467,9 @@ } } - if (tile_has_base_flag_for_unit(ptile, def_type, BF_DEFENSE_BONUS) !pcity) { + if (!pcity) { defensepower += - (defensepower * terrain_control.fortress_defense_bonus) / 100; + defensepower * tile_bases_defense_bonus(ptile, def_type) / 100; } if ((pcity || fortified) is_ground_unittype(def_type)) { diff -Nurd -X.diff_ignore freeciv/common/packets.def freeciv/common/packets.def --- freeciv/common/packets.def 2009-01-07 16:53:30.0 +0200 +++ freeciv/common/packets.def 2009-01-07 16:33:42.0 +0200 @@ -1191,7 +1191,6 @@ UINT16 river_trade_incr; /* added to trade if Civ2 river */ STRING river_help_text[MAX_LEN_PACKET]; # help for Civ2-style rivers - SINT16 fortress_defense_bonus;/* % added to defense if fortress */ UINT16 road_superhighway_trade_bonus; # % added to trade if road/s-highway UINT16 rail_tile_bonus[O_MAX];/* % added to output if railroad */ UINT8 pollution_tile_penalty[O_MAX]; /* % taken from output if polluted */ diff -Nurd -X.diff_ignore freeciv/common/tile.c freeciv/common/tile.c --- freeciv/common/tile.c 2009-01-07 16:53:30.0 +0200 +++ freeciv/common/tile.c 2009-01-07 16:42:32.0 +0200 @@ -247,6 +247,24 @@ } / + Calculate defense bonus given by bases +/ +int tile_bases_defense_bonus(const struct tile *ptile, + const struct unit_type *punittype) +{ + int bonus = 0; + + base_type_iterate(pbase) { +if (tile_has_base(ptile, pbase) + is_native_base_to_uclass(pbase, utype_class(punittype))) { + bonus += pbase-defense_bonus; +} + } base_type_iterate_end; + + return bonus; +} + +/ Check if tile contains base native for unit / bool tile_has_native_base(const struct tile *ptile, diff -Nurd -X.diff_ignore freeciv/common/tile.h freeciv/common/tile.h --- freeciv/common/tile.h 2009-01-07 16:53:30.0 +0200 +++ freeciv/common/tile.h 2009-01-07 16:44:45.0 +0200 @@ -110,6 +110,8 @@ const struct unit_type *punittype); bool tile_has_claimable_base(const struct tile *ptile, const struct unit_type *punittype); +int tile_bases_defense_bonus(const struct tile *ptile, + const struct unit_type *punittype); /* Vision related */ enum known_type tile_get_known(const struct tile *ptile, diff -Nurd -X.diff_ignore freeciv/data/civ1/terrain.ruleset freeciv/data/civ1/terrain.ruleset --- freeciv/data/civ1/terrain.ruleset 2009-01-07 16:53:30.0 +0200 +++ freeciv/data/civ1/terrain.ruleset 2009-01-07 16:51:25.0 +0200 @@ -53,9 +53,6 @@ ; help text for Civ2-style rivers river_help_text= -; percent added to defense if square has
Re: [Freeciv-Dev] (PR#40633) [Patch] Border radius property for bases
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40633 2009/1/7 Marko Lindqvist: Currently bases have only ClaimTerritory flag indicating if they should claim territory or not. Hardcoded border radius of 5 is used for all bases that do. Attached patch replaces ClaimTerritory flag with border radius property for each base. In the process civ1 civ2 rulesets are fixed so that their fortress has no territory claiming properties. Applies on top of #40631 - Use value -1 instead of 0 to disable. This allows bases that claim only the tile they are on. - ML diff -Nurd -X.diff_ignore freeciv/client/packhand.c freeciv/client/packhand.c --- freeciv/client/packhand.c 2009-01-07 18:17:49.0 +0200 +++ freeciv/client/packhand.c 2009-01-07 18:17:38.0 +0200 @@ -2909,6 +2909,7 @@ pbase-gui_type = p-gui_type; pbase-build_time = p-build_time; + pbase-border_sq = p-border_sq; pbase-flags = p-flags; diff -Nurd -X.diff_ignore freeciv/common/base.c freeciv/common/base.c --- freeciv/common/base.c 2009-01-07 17:59:59.0 +0200 +++ freeciv/common/base.c 2009-01-07 18:20:41.0 +0200 @@ -32,7 +32,7 @@ static const char *base_type_flag_names[] = { NoAggressive, DefenseBonus, NoStackDeath, - ClaimTerritory, DiplomatDefense, ParadropFrom + DiplomatDefense, ParadropFrom }; /* This must correspond to enum base_gui_type in base.h */ @@ -302,3 +302,11 @@ return !BV_ISSET(base1-conflicts, base_index(base2)); } + +/** + Does this base type claim territory? +**/ +bool territory_claiming_base(const struct base_type *pbase) +{ + return pbase-border_sq = 0; +} diff -Nurd -X.diff_ignore freeciv/common/base.h freeciv/common/base.h --- freeciv/common/base.h 2009-01-07 17:59:59.0 +0200 +++ freeciv/common/base.h 2009-01-07 18:17:38.0 +0200 @@ -29,7 +29,6 @@ * if base is close to city */ BF_DEFENSE_BONUS, /* Base provides defense bonus for units inside */ BF_NO_STACK_DEATH, /* Units inside will not die all at once */ - BF_CLAIM_TERRITORY,/* Base claims tile ownership */ BF_DIPLOMAT_DEFENSE, /* Base provides bonus for defending diplomat */ BF_PARADROP_FROM, /* Paratroopers can use base for paradrop */ BF_LAST/* This has to be last */ @@ -47,6 +46,7 @@ struct requirement_vector reqs; enum base_gui_type gui_type; int build_time; + int border_sq; bv_unit_classes native_to; bv_base_flags flags; @@ -91,6 +91,8 @@ bool can_bases_coexist(const struct base_type *base1, const struct base_type *base2); +bool territory_claiming_base(const struct base_type *pbase); + /* Initialization and iteration */ void base_types_init(void); void base_types_free(void); diff -Nurd -X.diff_ignore freeciv/common/borders.c freeciv/common/borders.c --- freeciv/common/borders.c2009-01-07 18:17:54.0 +0200 +++ freeciv/common/borders.c2009-01-07 18:17:38.0 +0200 @@ -47,8 +47,8 @@ radius_sq += pcity-size * game.info.border_size_effect; } else { base_type_iterate(pbase) { - if (tile_has_base(ptile, pbase) base_has_flag(pbase, BF_CLAIM_TERRITORY)) { -radius_sq = 5; + if (tile_has_base(ptile, pbase) territory_claiming_base(pbase)) { +radius_sq = pbase-border_sq; break; } } base_type_iterate_end; @@ -68,7 +68,7 @@ if (tile_owner(ptile) != NULL) { base_type_iterate(pbase) { - if (tile_has_base(ptile, pbase) base_has_flag(pbase, BF_CLAIM_TERRITORY)) { + if (tile_has_base(ptile, pbase) territory_claiming_base(pbase)) { return TRUE; } } base_type_iterate_end; diff -Nurd -X.diff_ignore freeciv/common/packets.def freeciv/common/packets.def --- freeciv/common/packets.def 2009-01-07 18:17:54.0 +0200 +++ freeciv/common/packets.def 2009-01-07 18:17:38.0 +0200 @@ -1318,6 +1318,7 @@ BASE_GUI gui_type; BV_UNIT_CLASSES native_to; UINT8 build_time; + UINT8 border_sq; BV_BASE_FLAGS flags; end diff -Nurd -X.diff_ignore freeciv/common/tile.c freeciv/common/tile.c --- freeciv/common/tile.c 2009-01-07 18:17:49.0 +0200 +++ freeciv/common/tile.c 2009-01-07 18:17:38.0 +0200 @@ -230,6 +230,23 @@ } / + Check if tile contains base providing effect for unit +/ +bool tile_has_claimable_base(const struct tile *ptile, + const struct unit_type *punittype) +{ + base_type_iterate(pbase) { +if (tile_has_base(ptile, pbase) + territory_claiming_base(pbase) + is_native_base_to_uclass(pbase, utype_class(punittype))) { + return TRUE; +} + }
[Freeciv-Dev] (PR#40636) [Patch] Vision property to bases
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40636 This patch adds vision range property to bases. Vision is given to player who owns the tile where base is. Applies on top of #40635 - ML diff -Nurd -X.diff_ignore freeciv/common/base.h freeciv/common/base.h --- freeciv/common/base.h 2009-01-07 18:39:50.0 +0200 +++ freeciv/common/base.h 2009-01-07 18:42:38.0 +0200 @@ -48,6 +48,7 @@ int build_time; int defense_bonus; int border_sq; + int vision_sq; bv_unit_classes native_to; bv_base_flags flags; diff -Nurd -X.diff_ignore freeciv/common/packets.def freeciv/common/packets.def --- freeciv/common/packets.def 2009-01-07 18:39:50.0 +0200 +++ freeciv/common/packets.def 2009-01-07 18:59:19.0 +0200 @@ -430,7 +430,7 @@ UINT8 forced_science; UINT8 forced_luxury; UINT8 forced_gold; - BOOL city_reveal_tiles; + BOOL vision_reveal_tiles; UINT8 min_city_center_output[O_MAX]; UINT8 min_dist_bw_cities; UINT8 init_vis_radius_sq; @@ -1317,7 +1317,9 @@ BASE_GUI gui_type; BV_UNIT_CLASSES native_to; UINT8 build_time; + UINT8 defense_bonus; UINT8 border_sq; + UINT8 vision_sq; BV_BASE_FLAGS flags; end diff -Nurd -X.diff_ignore freeciv/server/citytools.c freeciv/server/citytools.c --- freeciv/server/citytools.c 2009-01-07 18:39:50.0 +0200 +++ freeciv/server/citytools.c 2009-01-07 19:05:33.0 +0200 @@ -874,7 +874,7 @@ old_vision = pcity-server.vision; new_vision = vision_new(ptaker, pcenter); pcity-server.vision = new_vision; - vision_reveal_tiles(new_vision, game.info.city_reveal_tiles); + vision_reveal_tiles(new_vision, game.info.vision_reveal_tiles); vision_layer_iterate(v) { vision_change_sight(new_vision, v, vision_get_sight(old_vision, v)); @@ -1084,7 +1084,7 @@ /* Before arranging workers to show unknown land */ pcity-server.vision = vision_new(pplayer, ptile); - vision_reveal_tiles(pcity-server.vision, game.info.city_reveal_tiles); + vision_reveal_tiles(pcity-server.vision, game.info.vision_reveal_tiles); city_refresh_vision(pcity); city_list_prepend(pplayer-cities, pcity); diff -Nurd -X.diff_ignore freeciv/server/maphand.c freeciv/server/maphand.c --- freeciv/server/maphand.c2009-01-07 18:39:50.0 +0200 +++ freeciv/server/maphand.c2009-01-07 19:00:00.0 +0200 @@ -603,12 +603,12 @@ } /** -There doesn't have to be a city. + There doesn't have to be a city. **/ -static void map_refog_circle(struct player *pplayer, struct tile *ptile, -int old_radius_sq, int new_radius_sq, -bool can_reveal_tiles, -enum vision_layer vlayer) +void map_refog_circle(struct player *pplayer, struct tile *ptile, + int old_radius_sq, int new_radius_sq, + bool can_reveal_tiles, + enum vision_layer vlayer) { if (old_radius_sq != new_radius_sq) { int max_radius = MAX(old_radius_sq, new_radius_sq); @@ -1547,6 +1547,23 @@ } } + if (ploser != powner) { +base_type_iterate(pbase) { + if (tile_has_base(ptile, pbase) + pbase-vision_sq = 0) { +/* Transfer base provided vision to new owner */ +if (powner) { + map_refog_circle(powner, ptile, -1, pbase-vision_sq, + game.info.vision_reveal_tiles, V_MAIN); +} +if (ploser) { + map_refog_circle(ploser, ptile, pbase-vision_sq, -1, + game.info.vision_reveal_tiles, V_MAIN); +} + } +} base_type_iterate_end; + } + tile_set_owner(ptile, powner, psource); if (ploser != powner) { diff -Nurd -X.diff_ignore freeciv/server/maphand.h freeciv/server/maphand.h --- freeciv/server/maphand.h2009-01-07 18:39:50.0 +0200 +++ freeciv/server/maphand.h2009-01-07 18:56:22.0 +0200 @@ -61,6 +61,10 @@ void map_show_tile(struct player *pplayer, struct tile *ptile); void map_show_circle(struct player *pplayer, struct tile *ptile, int radius_sq); +void map_refog_circle(struct player *pplayer, struct tile *ptile, + int old_radius_sq, int new_radius_sq, + bool can_reveal_tiles, + enum vision_layer vlayer); void map_show_all(struct player *pplayer); bool map_is_known_and_seen(const struct tile *ptile, struct player *pplayer, diff -Nurd -X.diff_ignore freeciv/server/ruleset.c freeciv/server/ruleset.c --- freeciv/server/ruleset.c2009-01-07 18:39:50.0 +0200 +++ freeciv/server/ruleset.c2009-01-07 18:58:59.0 +0200 @@ -2017,6 +2017,8 @@ pbase-build_time = secfile_lookup_int(file, %s.build_time, section); pbase-border_sq =
[Freeciv-Dev] (PR#40632) server crashes in auto_arrange_workers
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40632 Freeciv server is crashing on my linux. reproduction: start a game and create a city. When the first city of user or ai is created the server crashes. version (both): freeciv-2.1.8 build from sources freeciv-2.1.8 prebuild fedora package system: fedora 10 with all updates (7.1.2009) and no self build packages backtrace: -- $ gdb server/civserver GNU gdb Fedora (6.8-29.fc10) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i386-redhat-linux-gnu... (gdb) run Starting program: /home/olli/work/freeciv-2.1.8/server/civserver This is the server for Freeciv version 2.1.8 You can learn a lot about Freeciv at http://www.freeciv.org/ 2: Loading rulesets 2: Now accepting new client connections. For introductory help, type 'help'. 2: (1) olli: connection request [ollisland] 2: (1) olli: connected [ollisland] Starting game. 2: Davit IV rules the Georgians. civserver: cityturn.c:276: auto_arrange_workers: Zusicherung »cmr.found_a_valid« nicht erfüllt. Program received signal SIGABRT, Aborted. 0x00110416 in __kernel_vsyscall () Missing separate debuginfos, use: debuginfo-install glibc-2.9-3.i686 ncurses-libs-5.6-20.20080927.fc10.i386 readline-5.2-13.fc9.i386 zlib-1.2.3-18.fc9.i386 (gdb) bt #0 0x00110416 in __kernel_vsyscall () #1 0x004bc460 in raise () from /lib/libc.so.6 #2 0x004bde28 in abort () from /lib/libc.so.6 #3 0x004b540e in __assert_fail () from /lib/libc.so.6 #4 0x08070778 in auto_arrange_workers (pcity=0x8471788) at cityturn.c:276 #5 0x0806d210 in create_city (pplayer=0x827990c, ptile=0x89dd9c8, name=0x846f7ac Kutaisi) at citytools.c:1039 #6 0x080a5afd in city_build (pplayer=0x827990c, punit=0x8a32038, name=0x846f7ac Kutaisi) at unithand.c:555 #7 0x0807a228 in server_handle_packet (type=PACKET_UNIT_BUILD_CITY, packet=0x6, pplayer=0x827990c, pconn=0x81a2240) at hand_gen.c:153 #8 0x08051443 in server_packet_input (pconn=0x81a2240, packet=0x0, type=53) at srv_main.c:1214 #9 0x0809f46b in incoming_client_packets () at sernet.c:396 #10 server_sniff_all_input () at sernet.c:752 #11 0x08052e8d in srv_running () at srv_main.c:1862 #12 srv_main () at srv_main.c:2211 #13 0x0804a775 in main (argc=1, argv=0xb4b4) at civserver.c:258 (gdb) bt full #0 0x00110416 in __kernel_vsyscall () No symbol table info available. #1 0x004bc460 in raise () from /lib/libc.so.6 No symbol table info available. #2 0x004bde28 in abort () from /lib/libc.so.6 No symbol table info available. #3 0x004b540e in __assert_fail () from /lib/libc.so.6 No symbol table info available. #4 0x08070778 in auto_arrange_workers (pcity=0x8471788) at cityturn.c:276 cmp = {minimal_surplus = {-10, -10, -10, -10, -10, -10}, require_happy = false, allow_disorder = true, allow_specialists = true, factor = {1, 1, 1, 1, 1, 1}, happy_factor = 1} cmr = {found_a_valid = false, disorder = 117, happy = 46, surplus = {1, 138876808, 0, 138876808, 136812812, 0}, worker_positions_used = {{true, false, false, false, 136}, {23, 71, 8, false, false}, {false, false, false, false, false}, {false, 37, false, false, false}, {4, false, false, false, 144}}, specialists = { 134987208, -1073752140, -1073752144, 4, 25, 0, 37, -1073752136, 134987432, 0, 0, 144562632, 144562632, 16777218, 2, 0, 0, -1073752088, 134943553, 144562632}} __PRETTY_FUNCTION__ = auto_arrange_workers #5 0x0806d210 in create_city (pplayer=0x827990c, ptile=0x89dd9c8, name=0x846f7ac Kutaisi) at citytools.c:1039 pcity = (struct city *) 0x8471788 x_itr = 5 y_itr = 5 nation = value optimized out __PRETTY_FUNCTION__ = create_city #6 0x080a5afd in city_build (pplayer=0x827990c, punit=0x8a32038, name=0x846f7ac Kutaisi) at unithand.c:555 message = \000\000\000\000\017\000\000\000\000\000\000\000\025, '\0' repeats 11 times, 0KG\b�\203G\b\000\004\000\000�\203G\b0KG\b\020� \v\b��L\b\035\000\000\000��\n\b�\203G\b0KG\b �L\b\f\231'\b\001\000 \000\fb\b��\...@\\032\b\b��VˣP\000\030{\000\000��L\b0fb\b�� \006\b0fb\b0fb\b8MG\b��d\b\001\000\000\000\f\231'\b(\006\b� \027.\b0fb\001\000\000\000\000\032\000\000\000\005\000\000 \000��d\b\001\000\000\000�... #7 0x0807a228 in server_handle_packet (type=PACKET_UNIT_BUILD_CITY, packet=0x6, pplayer=0x827990c, pconn=0x81a2240) at hand_gen.c:153 No locals. #8 0x08051443 in server_packet_input (pconn=0x81a2240, packet=0x0, type=53) at srv_main.c:1214 pplayer = (struct player *) 0x827990c #9 0x0809f46b in incoming_client_packets () at sernet.c:396 No locals. #10
Re: [Freeciv-Dev] (PR#40632) AutoReply: server crashes in auto_arrange_workers
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40632 I tested the actual svn version on my system which runs without crashes. thanks Am Mittwoch, den 07.01.2009, 04:17 -0800 schrieb The default queue: Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: server crashes in auto_arrange_workers, a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of (PR#40632). Please include the string: (PR#40632) in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, - Freeciv server is crashing on my linux. reproduction: start a game and create a city. When the first city of user or ai is created the server crashes. version (both): freeciv-2.1.8 build from sources freeciv-2.1.8 prebuild fedora package system: fedora 10 with all updates (7.1.2009) and no self build packages backtrace: -- $ gdb server/civserver GNU gdb Fedora (6.8-29.fc10) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i386-redhat-linux-gnu... (gdb) run Starting program: /home/olli/work/freeciv-2.1.8/server/civserver This is the server for Freeciv version 2.1.8 You can learn a lot about Freeciv at http://www.freeciv.org/ 2: Loading rulesets 2: Now accepting new client connections. For introductory help, type 'help'. 2: (1) olli: connection request [ollisland] 2: (1) olli: connected [ollisland] Starting game. 2: Davit IV rules the Georgians. civserver: cityturn.c:276: auto_arrange_workers: Zusicherung »cmr.found_a_valid« nicht erfüllt. Program received signal SIGABRT, Aborted. 0x00110416 in __kernel_vsyscall () Missing separate debuginfos, use: debuginfo-install glibc-2.9-3.i686 ncurses-libs-5.6-20.20080927.fc10.i386 readline-5.2-13.fc9.i386 zlib-1.2.3-18.fc9.i386 (gdb) bt #0 0x00110416 in __kernel_vsyscall () #1 0x004bc460 in raise () from /lib/libc.so.6 #2 0x004bde28 in abort () from /lib/libc.so.6 #3 0x004b540e in __assert_fail () from /lib/libc.so.6 #4 0x08070778 in auto_arrange_workers (pcity=0x8471788) at cityturn.c:276 #5 0x0806d210 in create_city (pplayer=0x827990c, ptile=0x89dd9c8, name=0x846f7ac Kutaisi) at citytools.c:1039 #6 0x080a5afd in city_build (pplayer=0x827990c, punit=0x8a32038, name=0x846f7ac Kutaisi) at unithand.c:555 #7 0x0807a228 in server_handle_packet (type=PACKET_UNIT_BUILD_CITY, packet=0x6, pplayer=0x827990c, pconn=0x81a2240) at hand_gen.c:153 #8 0x08051443 in server_packet_input (pconn=0x81a2240, packet=0x0, type=53) at srv_main.c:1214 #9 0x0809f46b in incoming_client_packets () at sernet.c:396 #10 server_sniff_all_input () at sernet.c:752 #11 0x08052e8d in srv_running () at srv_main.c:1862 #12 srv_main () at srv_main.c:2211 #13 0x0804a775 in main (argc=1, argv=0xb4b4) at civserver.c:258 (gdb) bt full #0 0x00110416 in __kernel_vsyscall () No symbol table info available. #1 0x004bc460 in raise () from /lib/libc.so.6 No symbol table info available. #2 0x004bde28 in abort () from /lib/libc.so.6 No symbol table info available. #3 0x004b540e in __assert_fail () from /lib/libc.so.6 No symbol table info available. #4 0x08070778 in auto_arrange_workers (pcity=0x8471788) at cityturn.c:276 cmp = {minimal_surplus = {-10, -10, -10, -10, -10, -10}, require_happy = false, allow_disorder = true, allow_specialists = true, factor = {1, 1, 1, 1, 1, 1}, happy_factor = 1} cmr = {found_a_valid = false, disorder = 117, happy = 46, surplus = {1, 138876808, 0, 138876808, 136812812, 0}, worker_positions_used = {{true, false, false, false, 136}, {23, 71, 8, false, false}, {false, false, false, false, false}, {false, 37, false, false, false}, {4, false, false, false, 144}}, specialists = { 134987208, -1073752140, -1073752144, 4, 25, 0, 37, -1073752136, 134987432, 0, 0, 144562632, 144562632, 16777218, 2, 0, 0, -1073752088, 134943553, 144562632}} __PRETTY_FUNCTION__ = auto_arrange_workers #5 0x0806d210 in create_city (pplayer=0x827990c, ptile=0x89dd9c8, name=0x846f7ac Kutaisi) at citytools.c:1039 pcity = (struct city *) 0x8471788 x_itr = 5 y_itr = 5 nation = value optimized out __PRETTY_FUNCTION__ = create_city #6 0x080a5afd in city_build (pplayer=0x827990c, punit=0x8a32038,
Re: [Freeciv-Dev] (PR#40637) [Patch] Buoy
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40637 On Wed, Jan 7, 2009 at 12:27 PM, Marko Lindqvist cazf...@gmail.com wrote: - It doesn't detect submarines as it only sees vision layer V_MAIN What a crappy buoy then! I mean, come on, what's a real sonar buoy for... Cheers, Brandon Van Every ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40607) City Health patch
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40607 2008/12/21 Yoav Luft: Hi, I think it's pretty much finished, at least the basic functionality. The attached .diff file adds the functionality of cities losing population when they grow too large due to diseases. I found additional comments in RT ticket that were not sent to mailing list. I looked latest version of the patch, 40607-freeciv-svn15395-health.patch.diff. So far I only read it through and tested compile. Basic functionality is rather simple. Good. Extra penalty from cities we trade with and had plague seems like unnecessary complication. It adds realism, but no new value to the game. How often you end with plague, and how often that happens to trigger another plague anyway. I would leave that part out, at least for now until basic functionality has been in use for some time. AI effect evaluation seems wrong to me v += c * 5 + (amount / 5) * pcity-illness + pcity-had_plague * 20; - Should return 0 if plague is turned off in ruleset - Should return 0 for size 1 city which never can be subject to plague - Had_plague does not increase possibility of the future plague (actually it makes it smaller, as city gets smaller) Coding style dictates that variables cannot be declared in the middle of the block. By removing braces somewhere in cityturn.c you leave int id in the middle of the block. Since you are adding new event, not this comment in event.h: /* * Note: If you add a new event, make sure you make a similar change * to the events array in common/events.c using GEN_EV, * data/stdsoundes and to server/scripting/api.pkg */ - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40610) auto_arrange_workers: Assertion `cmr.found_a_valid' failed.
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40610 [oliverburgh...@web.de - Wed Jan 07 12:17:16 2009]: Freeciv server is crashing on my linux. reproduction: start a game and create a city. When the first city of user or ai is created the server crashes. version (both): freeciv-2.1.8 build from sources freeciv-2.1.8 prebuild fedora package system: fedora 10 with all updates (7.1.2009) and no self build packages This is due to a bug in certain gcc 4.2 optimizations. Until the exact code that is miscomplied is found and replaced, compile with -O1 (or -O0), or upgrade gcc. --- 先祖に会いましょう。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40637) [Patch] Buoy
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40637 2009/1/7 Brandon J. Van Every: I mean, come on, what's a real sonar buoy for... Got better name for this thing? Gameplay wise I don't like the idea of basically removing submarines special power of being hard to detect. Lesser problem is that at this point it's impossible to define base that detects submarines. Changing that would be quite easy. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40638) [Patch] Vision_site cleanup
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40638 As borders handling is removed from vision_site, some vision_site stuff turns unused. Attached patch removes those unused parts. - ML diff -Nurd -X.diff_ignore freeciv/common/player.c freeciv/common/player.c --- freeciv/common/player.c 2008-11-11 17:38:45.0 +0200 +++ freeciv/common/player.c 2009-01-07 21:42:48.0 +0200 @@ -191,7 +191,6 @@ plr-capital = FALSE; plr-city_style=0;/* should be first basic style */ plr-cities = city_list_new(); - plr-sites = site_list_new(); plr-units = unit_list_new(); plr-connections = conn_list_new(); diff -Nurd -X.diff_ignore freeciv/common/player.h freeciv/common/player.h --- freeciv/common/player.h 2008-12-15 21:55:49.0 +0200 +++ freeciv/common/player.h 2009-01-07 21:43:10.0 +0200 @@ -181,7 +181,6 @@ struct player_diplstate diplstates[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS]; int city_style; struct city_list *cities; - struct site_list *sites; struct unit_list *units; struct player_score score; struct player_economic economic; diff -Nurd -X.diff_ignore freeciv/common/vision.c freeciv/common/vision.c --- freeciv/common/vision.c 2009-01-07 21:50:09.0 +0200 +++ freeciv/common/vision.c 2009-01-07 21:57:07.0 +0200 @@ -87,11 +87,6 @@ } assert(psite-ref_count == 0); - - if (psite-identity 0) { -/* This is base, not city */ -site_list_unlink(psite-owner-sites, psite); - } free(psite); } @@ -125,24 +120,6 @@ } / - Build basic vision_site structure based on military base on tile. -/ -struct vision_site *create_vision_site_from_base(struct tile *ptile, - struct base_type *pbase, - struct player *owner) -{ - struct vision_site *psite; - - psite = create_vision_site(-base_number(pbase) - 1, ptile, owner); - psite-size = 0; - sz_strlcpy(psite-name, base_name_translation(pbase)); - - site_list_append(owner-sites, psite); - - return psite; -} - -/ Returns the basic structure filled with current elements. / void update_vision_site_from_city(struct vision_site *psite, diff -Nurd -X.diff_ignore freeciv/common/vision.h freeciv/common/vision.h --- freeciv/common/vision.h 2009-01-07 21:50:09.0 +0200 +++ freeciv/common/vision.h 2009-01-07 21:57:14.0 +0200 @@ -114,7 +114,7 @@ struct player *owner;/* May be NULL, always check! */ int identity;/* city IDENTITY_NUMBER_ZERO */ - int size;/* city, or base pseudo-size */ + int size;/* city size */ bool occupied; bool walls; @@ -131,30 +131,8 @@ struct vision_site *create_vision_site(int identity, struct tile *location, struct player *owner); struct vision_site *create_vision_site_from_city(const struct city *pcity); -struct vision_site *create_vision_site_from_base(struct tile *ptile, - struct base_type *pbase, - struct player *owner); void update_vision_site_from_city(struct vision_site *psite, const struct city *pcity); void copy_vision_site(struct vision_site *dest, struct vision_site *src); -/* get 'struct site_list' and related functions: */ -#define SPECLIST_TAG site -#define SPECLIST_TYPE struct vision_site -#include speclist.h - -#define vision_site_list_iterate(sitelist, psite)\ -TYPED_LIST_ITERATE(struct vision_site, sitelist, psite) -#define vision_site_list_iterate_end LIST_ITERATE_END - -#define sites_iterate(psite) \ -{ \ - players_iterate(psite##_player) {\ -vision_site_list_iterate(psite##_player-sites, psite) { - -#define sites_iterate_end \ -} vision_site_list_iterate_end;\ - } players_iterate_end; \ -} - #endif /* FC__VISION_H */ diff -Nurd -X.diff_ignore freeciv/server/citytools.c freeciv/server/citytools.c --- freeciv/server/citytools.c 2009-01-07 21:50:09.0 +0200 +++ freeciv/server/citytools.c 2009-01-07 21:56:53.0 +0200 @@ -1905,7 +1905,7 @@ } /** -Removes outdated (nonexistant) cities from a player + Removes
[Freeciv-Dev] (PR#40639) [Patch] Border mode to reveal tiles
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40639 This patch adds another borders mode. With this mode borders extend to unknown tiles and reveal those (in addition to providing vision to already known tiles) - ML diff -Nurd -X.diff_ignore freeciv/common/game.h freeciv/common/game.h --- freeciv/common/game.h 2009-01-07 22:04:35.0 +0200 +++ freeciv/common/game.h 2009-01-07 22:05:23.0 +0200 @@ -204,7 +204,7 @@ /* 0 means no national borders. */ #define GAME_DEFAULT_BORDERS 1 #define GAME_MIN_BORDERS 0 -#define GAME_MAX_BORDERS 2 +#define GAME_MAX_BORDERS 3 #define GAME_DEFAULT_HAPPYBORDERSTRUE diff -Nurd -X.diff_ignore freeciv/server/maphand.c freeciv/server/maphand.c --- freeciv/server/maphand.c2009-01-07 22:04:35.0 +0200 +++ freeciv/server/maphand.c2009-01-07 22:07:06.0 +0200 @@ -1537,7 +1537,7 @@ { struct player *ploser = tile_owner(ptile); - if (game.info.borders 1) { + if (game.info.borders = 2) { if (ploser != powner) { if (ploser) { map_fog_tile(ploser, ptile, V_MAIN); @@ -1641,8 +1641,7 @@ continue; } -if (!map_is_known(dtile, owner)) { - /* without city_reveal_tiles option */ +if (!map_is_known(dtile, owner) game.info.borders 3) { continue; } diff -Nurd -X.diff_ignore freeciv/server/settings.c freeciv/server/settings.c --- freeciv/server/settings.c 2009-01-07 22:04:35.0 +0200 +++ freeciv/server/settings.c 2009-01-07 22:05:09.0 +0200 @@ -697,7 +697,8 @@ around a fortress or city will be owned by that nation.\n 0 = Disabled\n 1 = Enabled\n - 2 = See everything inside borders), + 2 = See everything inside borders\n + 3 = Borders expand to unknown, revealing tiles), NULL, GAME_MIN_BORDERS, GAME_MAX_BORDERS, GAME_DEFAULT_BORDERS) ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40637) [Patch] Buoy
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40637 On Wed, Jan 7, 2009 at 2:15 PM, Marko Lindqvist cazf...@gmail.com wrote: URL: http://bugs.freeciv.org/Ticket/Display.html?id=40637 2009/1/7 Brandon J. Van Every: I mean, come on, what's a real sonar buoy for... Got better name for this thing? You could call it radar station, and turn blind eye to fact that it's sitting in the water. Anybody asks it's naval radar station. ;-) I mean come on, if sonar doesn't work to detect things underwater, then it is totally stupid. Sonar is for water. If you do radar stations, put them on land also. Gameplay wise I don't like the idea of basically removing submarines special power of being hard to detect. It doesn't remove it, it makes it subject to defense spending. Same as Coastal Defense for naval bombardment. Reality in WW II is Germans had happy time in the Atlantic until sonar got much better. Then they suffered 85% casualties. In modern day, USA waters (and maybe international?) are thick with sonar listening stations. Very important for detecting subs that carry nukes. Wouldn't want Russian sub sailing up the Chesapeake Bay and unloading on D.C. would we. Not sure if stealth sub is realistic idea or not. Stealth ship does exist in real life, and also appeared in a James Bond movie. Lesser problem is that at this point it's impossible to define base that detects submarines. Changing that would be quite easy. Call To Power II had both radar and sonar. I don't remember it ruining anything. Cheers, Brandon Van Every ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40640) [Patch] Unified client common library
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40640 SDL uses macro magic to rename our main() as SDL_main(). This means that client common code library has different symbols when compiling SDL client than otherwise. Fixing this is step toward building multiple clients at once. Attached patch renames current main() in client common code as client_main() and adds new gui specific main(), that only calls client_main(). Now SDL can have SDL_main() while others have main(). - ML diff -Nurd -X.diff_ignore freeciv/client/civclient.c freeciv/client/civclient.c --- freeciv/client/civclient.c 2008-11-04 16:19:19.0 +0200 +++ freeciv/client/civclient.c 2009-01-07 23:05:20.0 +0200 @@ -19,10 +19,6 @@ #include windows.h /* LoadLibrary() */ #endif -#ifdef SDL -#include SDL.h -#endif - #include assert.h #include math.h #include stdio.h @@ -202,9 +198,9 @@ } /** -... + Entry point for common client code. **/ -int main(int argc, char *argv[]) +int client_main(int argc, char *argv[]) { int i, loglevel; int ui_options = 0; diff -Nurd -X.diff_ignore freeciv/client/civclient.h freeciv/client/civclient.h --- freeciv/client/civclient.h 2008-11-04 16:19:19.0 +0200 +++ freeciv/client/civclient.h 2009-01-07 22:59:36.0 +0200 @@ -33,6 +33,8 @@ C_S_OVER, /* Connected with game over. */ }; +int client_main(int argc, char *argv[]); + void client_packet_input(void *packet, int type); void send_report_request(enum report_type type); diff -Nurd -X.diff_ignore freeciv/client/gui-ftwl/gui_main.c freeciv/client/gui-ftwl/gui_main.c --- freeciv/client/gui-ftwl/gui_main.c 2008-11-11 17:38:45.0 +0200 +++ freeciv/client/gui-ftwl/gui_main.c 2009-01-07 23:07:55.0 +0200 @@ -174,7 +174,15 @@ } /** - The main loop for the UI. This is called from main(), and when it + Entry point for whole freeciv client program. +**/ +int main(int argc, char **argv) +{ + return client_main(argc, argv); +} + +/** + The main loop for the UI. This is called from client_main(), and when it exits the client will exit. **/ void ui_main(int argc, char *argv[]) diff -Nurd -X.diff_ignore freeciv/client/gui-gtk-2.0/gui_main.c freeciv/client/gui-gtk-2.0/gui_main.c --- freeciv/client/gui-gtk-2.0/gui_main.c 2008-11-09 00:26:56.0 +0200 +++ freeciv/client/gui-gtk-2.0/gui_main.c 2009-01-07 23:07:18.0 +0200 @@ -1422,7 +1422,15 @@ } /** - called from main(), is what it's named. + Entry point for whole freeciv client program. +**/ +int main(int argc, char **argv) +{ + return client_main(argc, argv); +} + +/** + Called from client_main(), is what it's named. **/ void ui_main(int argc, char **argv) { diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/gui_main.c freeciv/client/gui-sdl/gui_main.c --- freeciv/client/gui-sdl/gui_main.c 2008-11-11 17:38:45.0 +0200 +++ freeciv/client/gui-sdl/gui_main.c 2009-01-07 23:07:05.0 +0200 @@ -884,6 +884,16 @@ } /** + Entry point for freeciv client program. SDL has macro magic to turn + this in to function named SDL_main() and it provides actual main() + itself. +**/ +int main(int argc, char **argv) +{ + return client_main(argc, argv); +} + +/** The main loop for the UI. This is called from main(), and when it exits the client will exit. **/ diff -Nurd -X.diff_ignore freeciv/client/gui-stub/gui_main.c freeciv/client/gui-stub/gui_main.c --- freeciv/client/gui-stub/gui_main.c 2008-11-11 17:38:45.0 +0200 +++ freeciv/client/gui-stub/gui_main.c 2009-01-07 23:07:31.0 +0200 @@ -59,6 +59,14 @@ } /** + Entry point for whole freeciv client program. +**/ +int main(int argc, char **argv) +{ + return client_main(argc, argv); +} + +/** The main
Re: [Freeciv-Dev] (PR#40177) [Patch] Shared common library
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40177 2008/11/10 Marko Lindqvist: About status of this ticket: Some windows compilations (SDL client, build with nls) fail with this patch. Fixed. Please test. I plan to commit this version if nobody reports problems. - ML diff -Nurd -X.diff_ignore freeciv/ai/Makefile.am freeciv/ai/Makefile.am --- freeciv/ai/Makefile.am 2008-10-27 04:13:32.0 +0200 +++ freeciv/ai/Makefile.am 2009-01-07 23:20:55.0 +0200 @@ -1,10 +1,10 @@ ## Process this file with automake to produce Makefile.in -noinst_LIBRARIES = libcivai.a +noinst_LTLIBRARIES = libcivai.la AM_CPPFLAGS = -I$(top_srcdir)/utility -I$(srcdir)/../common -I$(srcdir)/../server -I$(top_srcdir)/common/aicore -I$(top_srcdir)/server/generator -libcivai_a_SOURCES = \ +libcivai_la_SOURCES = \ advdomestic.c \ advdomestic.h \ advmilitary.c \ diff -Nurd -X.diff_ignore freeciv/autogen.sh freeciv/autogen.sh --- freeciv/autogen.sh 2008-10-27 04:14:13.0 +0200 +++ freeciv/autogen.sh 2009-01-07 23:20:55.0 +0200 @@ -238,6 +238,8 @@ AUTOMAKE=$REALPKGNAME real_package_name aclocal ftp://ftp.gnu.org/pub/gnu/automake/; 1 6 || DIE=1 ACLOCAL=$REALPKGNAME +real_package_name libtoolize ftp://ftp.gnu.org/pub/gnu/libtool/; 1 || DIE=1 +LIBTOOLIZE=$REALPKGNAME if [ $FC_USE_NLS = yes ]; then DIE2=0 @@ -274,6 +276,12 @@ echo $AUTOCONF failed exit 1 } +echo + running $LIBTOOLIZE ... +$LIBTOOLIZE -f || { + echo + echo $LIBTOOLIZE failed + exit 1 +} echo + running $AUTOMAKE ... $AUTOMAKE -a -c || { echo diff -Nurd -X.diff_ignore freeciv/client/agents/Makefile.am freeciv/client/agents/Makefile.am --- freeciv/client/agents/Makefile.am 2008-10-27 04:13:58.0 +0200 +++ freeciv/client/agents/Makefile.am 2009-01-07 23:20:55.0 +0200 @@ -1,10 +1,10 @@ ## Process this file with automake to produce Makefile.in -noinst_LIBRARIES = libagents.a +noinst_LTLIBRARIES = libagents.la AM_CPPFLAGS = -I. -I$(srcdir)/.. -I$(top_srcdir)/common/aicore -I$(srcdir)/../include -I$(top_srcdir)/utility -I$(top_srcdir)/common -I$(srcdir)/../gui-gtk $(CLIENT_CFLAGS) -libagents_a_SOURCES = \ +libagents_la_SOURCES = \ agents.c\ agents.h\ cma_core.c \ diff -Nurd -X.diff_ignore freeciv/client/dummy.c freeciv/client/dummy.c --- freeciv/client/dummy.c 1970-01-01 02:00:00.0 +0200 +++ freeciv/client/dummy.c 2009-01-07 23:20:55.0 +0200 @@ -0,0 +1,6 @@ +/* + * Binaries cannot be linked from libraries only. + * Some sources are required directly. This is + * dummy sourcefile. + * + */ diff -Nurd -X.diff_ignore freeciv/client/gui-ftwl/Makefile.am freeciv/client/gui-ftwl/Makefile.am --- freeciv/client/gui-ftwl/Makefile.am 2008-10-27 04:14:02.0 +0200 +++ freeciv/client/gui-ftwl/Makefile.am 2009-01-07 23:20:55.0 +0200 @@ -1,11 +1,9 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = - -noinst_LIBRARIES = libguiclient.a +noinst_LTLIBRARIES = libguiclient.la AM_CPPFLAGS = -I. -I$(top_srcdir)/utility -I$(top_srcdir)/utility/ftwl -I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I$(srcdir)/.. -I$(srcdir)/../include $(CLIENT_CFLAGS) -libguiclient_a_SOURCES = \ +libguiclient_la_SOURCES = \ canvas.c\ canvas.h\ chatline.c \ diff -Nurd -X.diff_ignore freeciv/client/gui-gtk-2.0/Makefile.am freeciv/client/gui-gtk-2.0/Makefile.am --- freeciv/client/gui-gtk-2.0/Makefile.am 2008-10-27 04:13:59.0 +0200 +++ freeciv/client/gui-gtk-2.0/Makefile.am 2009-01-07 23:20:55.0 +0200 @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -noinst_LIBRARIES = libguiclient.a +noinst_LTLIBRARIES = libguiclient.la AM_CPPFLAGS = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/utility -I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I$(srcdir)/../agents $(CLIENT_CFLAGS) $(GGZ_GTK_INCLUDES) # The AM_CPPFLAGS -I. is so resources.c includes the locally generated @@ -16,9 +16,9 @@ echo '/*/' Freeciv.h $(srcdir)/rc2c $(top_srcdir)/data/freeciv.rc-2.0 Freeciv.h -libguiclient_a_DEPENDENCIES = rc2c +libguiclient_la_DEPENDENCIES = rc2c -libguiclient_a_SOURCES = \ +libguiclient_la_SOURCES = \ rc2c\ Freeciv.h \ canvas.c\ diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/Makefile.am freeciv/client/gui-sdl/Makefile.am --- freeciv/client/gui-sdl/Makefile.am 2008-10-27 04:14:02.0 +0200 +++ freeciv/client/gui-sdl/Makefile.am 2009-01-07 23:20:55.0 +0200 @@ -1,10 +1,10 @@ ## Process this file with automake to produce Makefile.in -noinst_LIBRARIES = libguiclient.a +noinst_LTLIBRARIES = libguiclient.la AM_CPPFLAGS = -I$(srcdir)/..
[Freeciv-Dev] (PR#40610) auto_arrange_workers: Assertion `cmr.found_a_valid' failed.
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40610 [guest - Wed Jan 07 23:12:40 2009]: I am using gcc 4.3.2, but by using -O1 it works - thanks. This is strange. I thought the assertion was being triggered due to miscompiled code caused by a bug in gcc 4.2, that has since been fixed in gcc 4.3. I even tested the default compile of 2.1.8 with gcc 4.3.2 and I did not get the assertion failure. Perhaps then redhat added some custom patches to its gcc? $ gcc -v Es werden eingebaute Spezifikationen verwendet. Ziel: i386-redhat-linux Konfiguriert mit: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind- exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat- linux Thread-Modell: posix gcc-Version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) For comparison on my machine: $ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.3.2/configure --prefix=/usr Thread model: posix gcc version 4.3.2 (GCC) :( --- 元気出して。とにかく、近頃はその種の帽子をかぶらないよね。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40177) [Patched] Shared common library
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40177 [cazf...@gmail.com - Thu Jan 08 00:15:25 2009]: 2008/11/10 Marko Lindqvist: About status of this ticket: Some windows compilations (SDL client, build with nls) fail with this patch. Fixed. Please test. I plan to commit this version if nobody reports problems. I tested the patch on linux with the gtk, sdl and xaw clients configured and it seems to work well. Maybe dummy.c could be renamed civclient.c and the existing civclient.[ch] renamed to client.[ch]? Or perhaps client_main.[ch] would be a better name, since there is already clinet. It's just that calling it dummy makes it look like a hack... :/ I guess it should have the full copyright notice at the top too, and a comment about where the real civclient main function is, in case future would- be programmers go looking for it there. +# FIXME: Server library is calling AI functions. +#We should get rid of this dependency. I agree that this should be addressed; it really deserves its own full ticket. --- 先週の土曜日参照の迷宮で迷子になってしまった。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev