Author: cazfi
Date: Mon May 16 20:32:55 2016
New Revision: 32727

URL: http://svn.gna.org/viewcvs/freeciv?rev=32727&view=rev
Log:
Added extern "C" for C++ compilations in headers under aicore/

See bug #24669

Modified:
    trunk/common/aicore/aisupport.h
    trunk/common/aicore/caravan.h
    trunk/common/aicore/citymap.h
    trunk/common/aicore/cm.h
    trunk/common/aicore/path_finding.h
    trunk/common/aicore/pf_tools.h

Modified: trunk/common/aicore/aisupport.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/aisupport.h?rev=32727&r1=32726&r2=32727&view=diff
==============================================================================
--- trunk/common/aicore/aisupport.h     (original)
+++ trunk/common/aicore/aisupport.h     Mon May 16 20:32:55 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 2003 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,10 +13,21 @@
 #ifndef FC__AISUPPORT_H
 #define FC__AISUPPORT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* common */
 #include "fc_types.h"
+
 
 struct player *player_leading_spacerace(void);
 int player_distance_to_player(struct player *pplayer, struct player *target);
 int city_gold_worth(struct city *pcity);
 
-#endif
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* FC__AISUPPORT_H */

Modified: trunk/common/aicore/caravan.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/caravan.h?rev=32727&r1=32726&r2=32727&view=diff
==============================================================================
--- trunk/common/aicore/caravan.h       (original)
+++ trunk/common/aicore/caravan.h       Mon May 16 20:32:55 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -12,6 +12,11 @@
 ***********************************************************************/
 #ifndef FC__CARAVAN_H
 #define FC__CARAVAN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 
 /* utility */
 #include "log.h"                /* enum log_level */
@@ -135,7 +140,7 @@
   }
 
 void caravan_result_init_zero(struct caravan_result *result);
-int caravan_result_compare(const struct caravan_result *a, 
+int caravan_result_compare(const struct caravan_result *a,
                            const struct caravan_result *b);
 
 void caravan_evaluate(const struct unit *caravan, const struct city *dest,
@@ -150,4 +155,8 @@
                                const struct caravan_parameter *parameter,
                                struct caravan_result *result, bool omniscient);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* FC__CARAVAN_H */

Modified: trunk/common/aicore/citymap.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/citymap.h?rev=32727&r1=32726&r2=32727&view=diff
==============================================================================
--- trunk/common/aicore/citymap.h       (original)
+++ trunk/common/aicore/citymap.h       Mon May 16 20:32:55 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 2003 - Per I. Mathisen
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,9 +13,16 @@
 #ifndef FC__CITYMAP_H
 #define FC__CITYMAP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* utility */
+#include "support.h" /* bool type */
+
+/* common */
 #include "fc_types.h"
-
-#include "support.h"            /* bool type */
 
 void citymap_turn_init(struct player *pplayer);
 void citymap_reserve_city_spot(struct tile *ptile, int id);
@@ -26,4 +33,8 @@
 
 void citymap_free(void);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* FC__CITYMAP_H */

Modified: trunk/common/aicore/cm.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/cm.h?rev=32727&r1=32726&r2=32727&view=diff
==============================================================================
--- trunk/common/aicore/cm.h    (original)
+++ trunk/common/aicore/cm.h    Mon May 16 20:32:55 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 2002 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,6 +13,10 @@
 
 #ifndef FC__CM_H
 #define FC__CM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
 /*
  * The purpose of this module is to manage the citizens of a city. The
@@ -96,4 +100,8 @@
 void cm_result_from_main_map(struct cm_result *result,
                              const struct city *pcity);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* FC__CM_H */

Modified: trunk/common/aicore/path_finding.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/path_finding.h?rev=32727&r1=32726&r2=32727&view=diff
==============================================================================
--- trunk/common/aicore/path_finding.h  (original)
+++ trunk/common/aicore/path_finding.h  Mon May 16 20:32:55 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 2003 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -12,6 +12,11 @@
 ***********************************************************************/
 #ifndef FC__PATH_FINDING_H
 #define FC__PATH_FINDING_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 
 /* utility */
 #include "log.h"        /* enum log_level */
@@ -544,6 +549,7 @@
   struct tile *NAME_tile;                                                   \
   do {                                                                      \
     NAME_tile = pf_map_iter(_MY_pf_map_);
+
 #define pf_map_tiles_iterate_end                                            \
   } while (pf_map_iterate(_MY_pf_map_));                                    \
 }
@@ -565,8 +571,9 @@
   struct tile *NAME_tile;                                                   \
   int NAME_cost;                                                            \
   do {                                                                      \
-    NAME_tile = pf_map_iter(_MY_pf_map_);                              \
+    NAME_tile = pf_map_iter(_MY_pf_map_);                                   \
     NAME_cost = pf_map_iter_move_cost(_MY_pf_map_);
+
 #define pf_map_move_costs_iterate_end                                       \
   } while (pf_map_iterate(_MY_pf_map_));                                    \
 }
@@ -586,6 +593,7 @@
   struct pf_position NAME_pos;                                              \
   do {                                                                      \
     pf_map_iter_position(_MY_pf_map_, &NAME_pos);
+
 #define pf_map_positions_iterate_end                                        \
   } while (pf_map_iterate(_MY_pf_map_));                                    \
 }
@@ -605,8 +613,13 @@
   struct pf_path *NAME_path;\
   do {\
     NAME_path = pf_map_iter_path(_MY_pf_map_);
+
 #define pf_map_paths_iterate_end                                            \
   } while (pf_map_iterate(_MY_pf_map_));                                    \
 }
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* FC__PATH_FINDING_H */

Modified: trunk/common/aicore/pf_tools.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/pf_tools.h?rev=32727&r1=32726&r2=32727&view=diff
==============================================================================
--- trunk/common/aicore/pf_tools.h      (original)
+++ trunk/common/aicore/pf_tools.h      Mon May 16 20:32:55 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 2003 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,8 +13,13 @@
 #ifndef FC__PF_TOOLS_H
 #define FC__PF_TOOLS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* common/aicore */
 #include "path_finding.h"
-
 
 /* 
  * Use to create 'amphibious' paths. An amphibious path starts on a sea tile,
@@ -39,9 +44,9 @@
 
 
 void pft_fill_unit_parameter(struct pf_parameter *parameter,
-                            const struct unit *punit);
+                             const struct unit *punit);
 void pft_fill_unit_overlap_param(struct pf_parameter *parameter,
-                                const struct unit *punit);
+                                 const struct unit *punit);
 void pft_fill_unit_attack_param(struct pf_parameter *parameter,
                                 const struct unit *punit);
 
@@ -70,4 +75,8 @@
                                           enum known_type known,
                                           const struct pf_parameter *param);
 
-#endif                         /* FC__PF_TOOLS_H */
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* FC__PF_TOOLS_H */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to