mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
cad/geda: make the port's code consumable by contemporary compilers
Ensure that there is only one variable definition per each object, as the C (and C++) standards mandated for years and compilers started to enforce as of recently (Clang 11, GCC 10).
This commit is contained in:
parent
60194bbd3a
commit
e3df77b3ab
4 changed files with 85 additions and 0 deletions
45
cad/geda/files/patch-gattrib_include_globals.h
Normal file
45
cad/geda/files/patch-gattrib_include_globals.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
--- gattrib/include/globals.h.orig 2013-08-18 17:02:48 UTC
|
||||
+++ gattrib/include/globals.h
|
||||
@@ -76,7 +76,7 @@
|
||||
* structs.h
|
||||
*/
|
||||
/*------------------------------------------------------------------*/
|
||||
-TOPLEVEL *pr_current;
|
||||
+extern TOPLEVEL *pr_current;
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/*!
|
||||
@@ -85,7 +85,7 @@ TOPLEVEL *pr_current;
|
||||
* callbacks. It is defined in structs.h
|
||||
*/
|
||||
/*------------------------------------------------------------------*/
|
||||
-SHEET_DATA *sheet_head;
|
||||
+extern SHEET_DATA *sheet_head;
|
||||
|
||||
/*------------------------------------------------------------------
|
||||
* GTKsheet includes: stuff for dealing with windows.
|
||||
@@ -94,18 +94,14 @@ SHEET_DATA *sheet_head;
|
||||
#define DEFAULT_SPACE 8
|
||||
#define NUM_SHEETS 3 /* Components, Nets, and Pins */
|
||||
|
||||
-GtkWidget *window; /* Main window */
|
||||
-GtkWidget *notebook;
|
||||
+extern GtkWidget *window; /* Main window */
|
||||
+extern GtkWidget *notebook;
|
||||
|
||||
-GtkSheet **sheets; /* These are the spreadsheet widgets themselves */
|
||||
+extern GtkSheet **sheets; /* These are the spreadsheet widgets themselves */
|
||||
|
||||
-GtkWidget **scrolled_windows;
|
||||
-GtkWidget *entry;
|
||||
-GtkWidget *location;
|
||||
-GtkWidget *left_button;
|
||||
-GtkWidget *center_button;
|
||||
-GtkWidget *right_button;
|
||||
-GtkWidget *label;
|
||||
+extern GtkWidget **scrolled_windows;
|
||||
+extern GtkWidget *entry;
|
||||
+extern GtkWidget *label;
|
||||
|
||||
/* command line switch settings */
|
||||
extern int verbose_mode;
|
19
cad/geda/files/patch-gattrib_src_gtksheet__2__2.c
Normal file
19
cad/geda/files/patch-gattrib_src_gtksheet__2__2.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- gattrib/src/gtksheet_2_2.c.orig 2013-09-25 20:59:27 UTC
|
||||
+++ gattrib/src/gtksheet_2_2.c
|
||||
@@ -57,6 +57,16 @@
|
||||
#include "../include/prototype.h" /* function prototypes */
|
||||
#include "../include/globals.h"
|
||||
|
||||
+TOPLEVEL *pr_current;
|
||||
+SHEET_DATA *sheet_head;
|
||||
+
|
||||
+GtkWidget *window;
|
||||
+GtkWidget *notebook;
|
||||
+GtkSheet **sheets;
|
||||
+GtkWidget **scrolled_windows;
|
||||
+GtkWidget *entry;
|
||||
+GtkWidget *label;
|
||||
+
|
||||
#ifdef HAVE_LIBDMALLOC
|
||||
#include <dmalloc.h>
|
||||
#endif
|
11
cad/geda/files/patch-gschem_include_globals.h
Normal file
11
cad/geda/files/patch-gschem_include_globals.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- gschem/include/globals.h.orig 2013-08-18 17:02:48 UTC
|
||||
+++ gschem/include/globals.h
|
||||
@@ -27,7 +27,7 @@
|
||||
extern GList *global_window_list;
|
||||
|
||||
/* Manager for recently used files */
|
||||
-GtkRecentManager *recent_manager;
|
||||
+extern GtkRecentManager *recent_manager;
|
||||
|
||||
/* colors */
|
||||
extern GdkColor white;
|
10
cad/geda/files/patch-gschem_src_x__menus.c
Normal file
10
cad/geda/files/patch-gschem_src_x__menus.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- gschem/src/x_menus.c.orig 2013-09-25 20:59:27 UTC
|
||||
+++ gschem/src/x_menus.c
|
||||
@@ -58,6 +58,7 @@ static GtkItemFactoryEntry popup_items[] = {
|
||||
{N_("/Up"), NULL, i_callback_hierarchy_up, 0, NULL},
|
||||
};
|
||||
|
||||
+GtkRecentManager *recent_manager;
|
||||
int npopup_items = sizeof(popup_items) / sizeof(popup_items[0]);
|
||||
|
||||
/*! \todo Finish function documentation!!!
|
Loading…
Add table
Reference in a new issue