From 965131673ec87e4becbae5edd32935ced4eac606 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Apr 03 2008 17:39:10 +0000 Subject: - Fix missing prototype compiler warnings --- diff --git a/xfig-3.2.5-missing-protos.patch b/xfig-3.2.5-missing-protos.patch new file mode 100644 index 0000000..35d956b --- /dev/null +++ b/xfig-3.2.5-missing-protos.patch @@ -0,0 +1,127 @@ +diff -ur xfig.3.2.5/e_chop.c xfig.3.2.5.new/e_chop.c +--- xfig.3.2.5/e_chop.c 2005-07-26 18:56:28.000000000 +0200 ++++ xfig.3.2.5.new/e_chop.c 2008-04-03 18:58:07.000000000 +0200 +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include "fig.h" + #include "resources.h" + #include "mode.h" +@@ -29,6 +30,9 @@ + #include "u_list.h" + #include "u_search.h" + #include "u_undo.h" ++#include "u_markers.h" ++#include "u_geom.h" ++#include "u_redraw.h" + #include "w_canvas.h" + #include "w_drawprim.h" + #include "w_mousefun.h" +@@ -37,6 +41,8 @@ + #include "w_zoom.h" + #include "w_snap.h" + #include "w_intersect.h" ++#include "w_cursor.h" ++#include "f_util.h" + + static void select_axe_object(); + static void select_log_object(); +diff -ur xfig.3.2.5/main.c xfig.3.2.5.new/main.c +--- xfig.3.2.5/main.c 2008-04-03 19:28:25.000000000 +0200 ++++ xfig.3.2.5.new/main.c 2008-04-03 19:26:36.000000000 +0200 +@@ -68,6 +68,8 @@ + #include + #endif /* I18N */ + ++#include ++ + /* EXPORTS */ + + Boolean geomspec; +diff -ur xfig.3.2.5/w_intersect.c xfig.3.2.5.new/w_intersect.c +--- xfig.3.2.5/w_intersect.c 2004-09-29 23:46:00.000000000 +0200 ++++ xfig.3.2.5.new/w_intersect.c 2008-04-03 19:25:08.000000000 +0200 +@@ -23,6 +23,8 @@ + #include "mode.h" + #include "w_snap.h" + #include "w_intersect.h" ++#include "w_msgpanel.h" ++#include "f_util.h" + #include "u_quartic.h" + #include + #include +diff -ur xfig.3.2.5/w_intersect.h xfig.3.2.5.new/w_intersect.h +--- xfig.3.2.5/w_intersect.h 2004-09-28 05:05:03.000000000 +0200 ++++ xfig.3.2.5.new/w_intersect.h 2008-04-03 19:15:44.000000000 +0200 +@@ -59,4 +59,6 @@ + + extern F_line * build_text_bounding_box(F_text * t); + ++extern void delete_text_bounding_box(F_line * l); ++ + #endif +diff -ur xfig.3.2.5/w_keyboard.c xfig.3.2.5.new/w_keyboard.c +--- xfig.3.2.5/w_keyboard.c 2004-11-09 22:10:22.000000000 +0100 ++++ xfig.3.2.5.new/w_keyboard.c 2008-04-03 19:24:23.000000000 +0200 +@@ -31,7 +31,9 @@ + #include "w_setup.h" + #include "w_indpanel.h" + #include "w_util.h" ++#include "w_msgpanel.h" + #include "w_keyboard.h" ++#include "f_util.h" + + #if defined(__CYGWIN__) + #define REG_NOERROR REG_OKAY +diff -ur xfig.3.2.5/w_snap.c xfig.3.2.5.new/w_snap.c +--- xfig.3.2.5/w_snap.c 2004-09-29 23:52:16.000000000 +0200 ++++ xfig.3.2.5.new/w_snap.c 2008-04-03 19:16:37.000000000 +0200 +@@ -27,7 +27,10 @@ + #include "w_setup.h" + #include "w_indpanel.h" + #include "w_util.h" ++#include "w_msgpanel.h" + #include "u_quartic.h" ++#include "u_search.h" ++#include "f_util.h" + #include + #include + +@@ -850,6 +853,12 @@ + } + + ++#ifdef signbit ++#undef signbit ++#endif ++#define signbit(x) \ ++ ((0.0 > (x)) ? 1 : 0) ++ + Boolean + is_point_on_arc(a, x, y) + F_arc * a; +diff -ur xfig.3.2.5/w_snap.h xfig.3.2.5.new/w_snap.h +--- xfig.3.2.5/w_snap.h 2004-11-09 22:14:42.000000000 +0100 ++++ xfig.3.2.5.new/w_snap.h 2008-04-03 19:15:49.000000000 +0200 +@@ -63,8 +63,4 @@ + extern Widget snap_indicator_panel; + extern Widget snap_indicator_label; + +-# define signbit(x) \ +- ((0.0 > (x)) ? 1 : 0) +- +- + #endif +diff -up xfig.3.2.5/u_draw.c~ xfig.3.2.5/u_draw.c +--- xfig.3.2.5/u_draw.c~ 2008-04-03 15:58:23.000000000 +0200 ++++ xfig.3.2.5/u_draw.c 2008-04-03 15:58:23.000000000 +0200 +@@ -43,6 +43,7 @@ + #include "w_zoom.h" + #include "u_redraw.h" + #include "w_cursor.h" ++#include + + static Boolean add_point(int x, int y); + static void init_point_array(void); diff --git a/xfig.spec b/xfig.spec index 08d6ea2..70beac3 100644 --- a/xfig.spec +++ b/xfig.spec @@ -3,7 +3,7 @@ Summary: An X Window System tool for drawing basic vector graphics Name: xfig Version: 3.2.5 -Release: 9%{?dist} +Release: 10%{?dist} License: MIT Group: Applications/Multimedia URL: http://www.xfig.org/ @@ -22,6 +22,7 @@ Patch11: xfig-3.2.5-color-resources.patch Patch12: xfig-3.2.5-quiet.patch Patch13: xfig-3.2.5-urwfonts.patch Patch14: xfig-3.2.5-zoom-crash.patch +Patch15: xfig-3.2.5-missing-protos.patch BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -95,6 +96,7 @@ Files common to both the plain Xaw and the Xaw3d version of xfig. %patch12 -p1 -b .quiet %patch13 -p1 -b .urw %patch14 -p1 -b .zoom-crash +%patch15 -p1 ln -nfs Doc/xfig.man xfig.man find -type f -print0 | xargs -0 chmod -x rm `find Doc -name '*.orig'` Doc/html/*.save Doc/html/images/sav1a0.tmp @@ -111,7 +113,7 @@ xmkmf # make sure cmdline option parsing still works despite us renaming the binary sed -i 's/"xfig"/"xfig-Xaw3d"/' main.c make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \ - CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing" + CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strength-reduce -fno-strict-aliasing" mv xfig xfig-Xaw3d make distclean @@ -121,7 +123,7 @@ xmkmf # make sure cmdline option parsing still works despite us renaming the binary sed -i 's/"xfig-Xaw3d"/"xfig-plain"/' main.c make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \ - CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing" + CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strength-reduce -fno-strict-aliasing" %install @@ -186,6 +188,9 @@ fi %changelog +* Thu Apr 3 2008 Hans de Goede 3.2.5-10 +- Fix missing prototype compiler warnings + * Thu Feb 28 2008 Hans de Goede 3.2.5-9 - Fix cmdline parsing (broken by renaming the binary) (bz 435097)