diff options
author | dinoex <dinoex@FreeBSD.org> | 2009-03-15 04:10:23 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2009-03-15 04:10:23 +0800 |
commit | 97dc819b246b1e19b4e639fe8400fbda650c88ec (patch) | |
tree | 66fa91afc694a37896dce37c3778bde452f6ada9 | |
parent | 021e90e20d52896ceac9992406d4d422275088b9 (diff) | |
download | freebsd-ports-gnome-97dc819b246b1e19b4e639fe8400fbda650c88ec.tar.gz freebsd-ports-gnome-97dc819b246b1e19b4e639fe8400fbda650c88ec.tar.zst freebsd-ports-gnome-97dc819b246b1e19b4e639fe8400fbda650c88ec.zip |
- make fvwm compile w/o Warnings apart from one usage of mkstemp
by adding needed #includes, adding return statements to
non-void functions and declaring functions returning a int
instead of void if they do return an return code.
- start using one central safemalloc.
- do not mangle pointers which makes FvwmWinList work on
amd64/7-STABLE again.
PR: 132571
Submitted by: Bjoern A. Zeeb
39 files changed, 581 insertions, 1 deletions
diff --git a/x11-wm/fvwm/Makefile b/x11-wm/fvwm/Makefile index ad48ab5cf8f6..c1d506220ba9 100644 --- a/x11-wm/fvwm/Makefile +++ b/x11-wm/fvwm/Makefile @@ -7,7 +7,7 @@ PORTNAME= fvwm PORTVERSION= 1.24r -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-wm MASTER_SITES= ftp://ftp.fvwm.org/pub/fvwm/version-1/ \ ftp://ftp.ics.es.osaka-u.ac.jp/pub/CFAN/sources/1.x/ diff --git a/x11-wm/fvwm/files/patch-ButtonArray.c b/x11-wm/fvwm/files/patch-ButtonArray.c new file mode 100644 index 000000000000..3a85e009d2b6 --- /dev/null +++ b/x11-wm/fvwm/files/patch-ButtonArray.c @@ -0,0 +1,10 @@ +--- ./modules/FvwmWinList/ButtonArray.c.orig 1994-05-09 17:08:28.000000000 +0000 ++++ ./modules/FvwmWinList/ButtonArray.c 2009-03-11 09:42:51.000000000 +0000 +@@ -14,6 +14,7 @@ + + #include <stdlib.h> + #include <stdio.h> ++#include <string.h> + #include <X11/Xlib.h> + #include "ButtonArray.h" + #include "Mallocs.h" diff --git a/x11-wm/fvwm/files/patch-FvwmAudio.c b/x11-wm/fvwm/files/patch-FvwmAudio.c new file mode 100644 index 000000000000..065f8780ef72 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmAudio.c @@ -0,0 +1,11 @@ +--- ./modules/FvwmAudio/FvwmAudio.c.orig 1994-09-14 14:28:53.000000000 +0000 ++++ ./modules/FvwmAudio/FvwmAudio.c 2009-03-11 09:42:51.000000000 +0000 +@@ -477,7 +477,7 @@ + + if (sound_table[sound]) + { +- memset(buf,NULL,BUFSIZE); ++ memset(buf, 0, sizeof(buf)); + + /* + * Don't use audio_play_dir if it's NULL or if the sound file diff --git a/x11-wm/fvwm/files/patch-FvwmAuto.c b/x11-wm/fvwm/files/patch-FvwmAuto.c new file mode 100644 index 000000000000..79951e5aa017 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmAuto.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmAuto/FvwmAuto.c.orig 1994-12-02 19:04:02.000000000 +0000 ++++ ./modules/FvwmAuto/FvwmAuto.c 2009-03-11 09:42:51.000000000 +0000 +@@ -57,7 +57,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + FILE *file; + char mask_mesg[80]; +@@ -82,6 +82,7 @@ + sprintf(mask_mesg,"SET_MASK %lu\n",(unsigned long)(M_FOCUS_CHANGE)); + SendInfo(fd,mask_mesg,0); + Loop(fd); ++ return (0); + } + + diff --git a/x11-wm/fvwm/files/patch-FvwmBacker-Mallocs.c b/x11-wm/fvwm/files/patch-FvwmBacker-Mallocs.c new file mode 100644 index 000000000000..9483759d6f64 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmBacker-Mallocs.c @@ -0,0 +1,11 @@ +--- ./modules/FvwmBacker/Mallocs.c.orig 1994-09-14 20:06:16.000000000 +0000 ++++ ./modules/FvwmBacker/Mallocs.c 2009-03-11 09:42:51.000000000 +0000 +@@ -33,6 +33,8 @@ + #include "../../fvwm/alpha_header.h" + #endif /* NEEDS_ALPHA_HEADER */ + ++#include "Mallocs.h" ++ + extern char *Module; + + /****************************************************************************** diff --git a/x11-wm/fvwm/files/patch-FvwmBacker-Mallocs.h b/x11-wm/fvwm/files/patch-FvwmBacker-Mallocs.h new file mode 100644 index 000000000000..598440a4a5b9 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmBacker-Mallocs.h @@ -0,0 +1,13 @@ +--- ./modules/FvwmBacker/Mallocs.h.orig 1994-09-14 19:59:18.000000000 +0000 ++++ ./modules/FvwmBacker/Mallocs.h 2009-03-11 09:42:48.000000000 +0000 +@@ -18,8 +18,9 @@ + * own risk. Permission to use this program for any purpose is given, + * as long as the copyright is kept intact. */ + ++#include "../../libs/fvwmlib.h" ++ + /* Function Prototypes */ +-char *safemalloc(int length); + char *saferealloc(char *ptr, int length); + void sleep_a_little(int n); + void UpdateString(char **string,char *value); diff --git a/x11-wm/fvwm/files/patch-FvwmBacker.c b/x11-wm/fvwm/files/patch-FvwmBacker.c new file mode 100644 index 000000000000..56ba6599aea5 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmBacker.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmBacker/FvwmBacker.c.orig 1994-09-28 13:37:39.000000000 +0000 ++++ ./modules/FvwmBacker/FvwmBacker.c 2009-03-11 09:42:51.000000000 +0000 +@@ -84,7 +84,7 @@ + /* #define LOGFILE "/tmp/FvwmBacker.log"*/ + + +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + char* displayName = NULL; +@@ -139,6 +139,7 @@ + + /* Recieve all messages from Fvwm */ + EndLessLoop(); ++ return (0); + } + + /****************************************************************************** diff --git a/x11-wm/fvwm/files/patch-FvwmClean.c b/x11-wm/fvwm/files/patch-FvwmClean.c new file mode 100644 index 000000000000..c37e3064ebe8 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmClean.c @@ -0,0 +1,51 @@ +--- ./modules/FvwmClean/FvwmClean.c.orig 1994-09-16 15:53:49.000000000 +0000 ++++ ./modules/FvwmClean/FvwmClean.c 2009-03-11 09:42:51.000000000 +0000 +@@ -52,7 +52,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + FILE *file; +@@ -134,6 +134,7 @@ + SendInfo(fd,"Send_WindowList",0); + + Loop(fd); ++ return (0); + } + + +@@ -228,31 +229,6 @@ + } + + +- +- +-/*********************************************************************** +- * +- * Procedure: +- * safemalloc - mallocs specified space or exits if there's a +- * problem +- * +- ***********************************************************************/ +-char *safemalloc(int length) +-{ +- char *ptr; +- +- if(length <=0) +- length = 1; +- +- ptr = malloc(length); +- if(ptr == (char *)0) +- { +- fprintf(stderr,"%s:malloc failed",MyName); +- exit(1); +- } +- return ptr; +-} +- + /*********************************************************************** + * + * Procedure: diff --git a/x11-wm/fvwm/files/patch-FvwmClean.h b/x11-wm/fvwm/files/patch-FvwmClean.h new file mode 100644 index 000000000000..1ba83372b3e1 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmClean.h @@ -0,0 +1,10 @@ +--- ./modules/FvwmClean/FvwmClean.h.orig 1994-09-13 18:24:26.000000000 +0000 ++++ ./modules/FvwmClean/FvwmClean.h 2009-03-11 09:42:48.000000000 +0000 +@@ -18,7 +18,6 @@ + *************************************************************************/ + void Loop(int *fd); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int length); + struct list *find_window(unsigned long id); + void remove_window(unsigned long id); + void add_window(unsigned long new_win); diff --git a/x11-wm/fvwm/files/patch-FvwmDebug.c b/x11-wm/fvwm/files/patch-FvwmDebug.c new file mode 100644 index 000000000000..5b4d487b3e1f --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmDebug.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmDebug/FvwmDebug.c.orig 1994-09-30 12:48:59.000000000 +0000 ++++ ./modules/FvwmDebug/FvwmDebug.c 2009-03-11 09:42:51.000000000 +0000 +@@ -36,7 +36,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + +@@ -75,6 +75,7 @@ + SendInfo(fd,"Send_WindowList",0); + + Loop(fd); ++ return (0); + } + + /*********************************************************************** diff --git a/x11-wm/fvwm/files/patch-FvwmDebug.h b/x11-wm/fvwm/files/patch-FvwmDebug.h new file mode 100644 index 000000000000..bc0f56c2935f --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmDebug.h @@ -0,0 +1,10 @@ +--- ./modules/FvwmDebug/FvwmDebug.h.orig 1994-09-13 18:24:41.000000000 +0000 ++++ ./modules/FvwmDebug/FvwmDebug.h 2009-03-11 09:42:48.000000000 +0000 +@@ -6,7 +6,6 @@ + *************************************************************************/ + void Loop(int *fd); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int length); + void DeadPipe(int nonsense); + void process_message(unsigned long type,unsigned long *body); + diff --git a/x11-wm/fvwm/files/patch-FvwmIconBox.c b/x11-wm/fvwm/files/patch-FvwmIconBox.c new file mode 100644 index 000000000000..ce62dc4db41b --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmIconBox.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmIconBox/FvwmIconBox.c.orig 1994-09-16 15:54:49.000000000 +0000 ++++ ./modules/FvwmIconBox/FvwmIconBox.c 2009-03-11 09:42:51.000000000 +0000 +@@ -155,7 +155,7 @@ + Based on main() from GoodStuff: + Copyright 1993, Robert Nation. + ************************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *display_name = NULL; + char *temp, *s; +@@ -223,6 +223,7 @@ + SendFvwmPipe(fd,"Send_WindowList",0); + + Loop(); ++ return (0); + } + + /************************************************************************ diff --git a/x11-wm/fvwm/files/patch-FvwmIconBox.h b/x11-wm/fvwm/files/patch-FvwmIconBox.h new file mode 100644 index 000000000000..090080bf4c27 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmIconBox.h @@ -0,0 +1,10 @@ +--- ./modules/FvwmIconBox/FvwmIconBox.h.orig 1994-09-13 20:38:23.000000000 +0000 ++++ ./modules/FvwmIconBox/FvwmIconBox.h 2009-03-11 09:42:48.000000000 +0000 +@@ -15,7 +15,6 @@ + extern void match_string(char *tline); + extern void Loop(void); + extern void ParseOptions(char *); +-extern char *safemalloc(int length); + extern void change_window_name(char *str); + extern int My_XNextEvent(Display *dpy, XEvent *event); + extern void CopyString(char **dest, char *source); diff --git a/x11-wm/fvwm/files/patch-FvwmIdent.c b/x11-wm/fvwm/files/patch-FvwmIdent.c new file mode 100644 index 000000000000..07e16ac0d679 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmIdent.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmIdent/FvwmIdent.c.orig 1994-09-16 15:07:11.000000000 +0000 ++++ ./modules/FvwmIdent/FvwmIdent.c 2009-03-11 09:42:51.000000000 +0000 +@@ -80,7 +80,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + FILE *file; +@@ -173,6 +173,7 @@ + SendInfo(fd,"Send_WindowList",0); + + Loop(fd); ++ return (0); + } + + /************************************************************************** diff --git a/x11-wm/fvwm/files/patch-FvwmIdent.h b/x11-wm/fvwm/files/patch-FvwmIdent.h new file mode 100644 index 000000000000..87c8ca8a4e14 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmIdent.h @@ -0,0 +1,10 @@ +--- ./modules/FvwmIdent/FvwmIdent.h.orig 1994-09-13 18:25:16.000000000 +0000 ++++ ./modules/FvwmIdent/FvwmIdent.h 2009-03-11 09:42:48.000000000 +0000 +@@ -42,7 +42,6 @@ + *************************************************************************/ + void Loop(int *fd); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int length); + void DeadPipe(int nonsense); + void process_message(unsigned long type,unsigned long *body); + void GetTargetWindow(Window *app_win); diff --git a/x11-wm/fvwm/files/patch-FvwmPager.c b/x11-wm/fvwm/files/patch-FvwmPager.c new file mode 100644 index 000000000000..4c051208435c --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmPager.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmPager/FvwmPager.c.orig 1994-10-07 12:49:26.000000000 +0000 ++++ ./modules/FvwmPager/FvwmPager.c 2009-03-11 09:42:51.000000000 +0000 +@@ -82,7 +82,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s, *cptr; + char *display_name = NULL; +@@ -186,6 +186,7 @@ + SendInfo(fd,"Send_WindowList",0); + + Loop(fd); ++ return (0); + } + + /*********************************************************************** diff --git a/x11-wm/fvwm/files/patch-FvwmPager.h b/x11-wm/fvwm/files/patch-FvwmPager.h new file mode 100644 index 000000000000..b0df562a9b76 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmPager.h @@ -0,0 +1,16 @@ +--- ./modules/FvwmPager/FvwmPager.h.orig 1994-10-07 12:49:27.000000000 +0000 ++++ ./modules/FvwmPager/FvwmPager.h 2009-03-11 09:42:48.000000000 +0000 +@@ -1,3 +1,5 @@ ++#include "../../libs/fvwmlib.h" ++ + typedef struct ScreenInfo + { + unsigned long screen; +@@ -83,7 +85,6 @@ + *************************************************************************/ + void Loop(int *fd); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int length); + void DeadPipe(int nonsense); + void process_message(unsigned long type,unsigned long *body); + void ParseOptions(char *filename); diff --git a/x11-wm/fvwm/files/patch-FvwmSave.c b/x11-wm/fvwm/files/patch-FvwmSave.c new file mode 100644 index 000000000000..97237757f74a --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmSave.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmSave/FvwmSave.c.orig 1994-09-16 15:07:40.000000000 +0000 ++++ ./modules/FvwmSave/FvwmSave.c 2009-03-11 09:42:51.000000000 +0000 +@@ -51,7 +51,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + char *display_name = NULL; +@@ -99,6 +99,7 @@ + SendInfo(fd,"Send_WindowList",0); + + Loop(fd); ++ return (0); + } + + diff --git a/x11-wm/fvwm/files/patch-FvwmSave.h b/x11-wm/fvwm/files/patch-FvwmSave.h new file mode 100644 index 000000000000..a71f1d4ff961 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmSave.h @@ -0,0 +1,10 @@ +--- ./modules/FvwmSave/FvwmSave.h.orig 1994-09-13 18:25:36.000000000 +0000 ++++ ./modules/FvwmSave/FvwmSave.h 2009-03-11 09:42:48.000000000 +0000 +@@ -26,7 +26,6 @@ + *************************************************************************/ + void Loop(int *fd); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int length); + struct list *find_window(unsigned long id); + void add_window(unsigned long new_win, unsigned long *body); + void DeadPipe(int nonsense); diff --git a/x11-wm/fvwm/files/patch-FvwmSaveDesk.c b/x11-wm/fvwm/files/patch-FvwmSaveDesk.c new file mode 100644 index 000000000000..7c68b020179c --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmSaveDesk.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmSaveDesk/FvwmSaveDesk.c.orig 1994-09-16 15:07:59.000000000 +0000 ++++ ./modules/FvwmSaveDesk/FvwmSaveDesk.c 2009-03-11 09:42:51.000000000 +0000 +@@ -64,7 +64,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + char *display_name = NULL; +@@ -112,6 +112,7 @@ + SendInfo(fd,"Send_WindowList",0); + + Loop(fd); ++ return (0); + } + + diff --git a/x11-wm/fvwm/files/patch-FvwmSaveDesk.h b/x11-wm/fvwm/files/patch-FvwmSaveDesk.h new file mode 100644 index 000000000000..234653ba55c4 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmSaveDesk.h @@ -0,0 +1,10 @@ +--- ./modules/FvwmSaveDesk/FvwmSaveDesk.h.orig 1994-09-13 18:25:45.000000000 +0000 ++++ ./modules/FvwmSaveDesk/FvwmSaveDesk.h 2009-03-11 09:42:48.000000000 +0000 +@@ -27,7 +27,6 @@ + *************************************************************************/ + void Loop(int *fd); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int length); + struct list *find_window(unsigned long id); + void add_window(unsigned long new_win, unsigned long *body); + void DeadPipe(int nonsense); diff --git a/x11-wm/fvwm/files/patch-FvwmScroll.c b/x11-wm/fvwm/files/patch-FvwmScroll.c new file mode 100644 index 000000000000..b61e5c86cc36 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmScroll.c @@ -0,0 +1,26 @@ +--- ./modules/FvwmScroll/FvwmScroll.c.orig 1994-09-16 15:08:10.000000000 +0000 ++++ ./modules/FvwmScroll/FvwmScroll.c 2009-03-11 09:42:51.000000000 +0000 +@@ -65,7 +65,7 @@ + * main - start of module + * + ***********************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + FILE *file; +@@ -159,12 +159,13 @@ + GetTargetWindow(&app_win); + + if(app_win == 0) +- return; ++ return (0); + + fd_width = GetFdWidth(); + + GrabWindow(app_win); + Loop(app_win); ++ return (0); + } + + diff --git a/x11-wm/fvwm/files/patch-FvwmScroll.h b/x11-wm/fvwm/files/patch-FvwmScroll.h new file mode 100644 index 000000000000..346d9a77fd5f --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmScroll.h @@ -0,0 +1,8 @@ +--- ./modules/FvwmScroll/FvwmScroll.h.orig 1994-09-14 14:11:35.000000000 +0000 ++++ ./modules/FvwmScroll/FvwmScroll.h 2009-03-11 09:42:48.000000000 +0000 +@@ -1,5 +1,4 @@ + #include "../../libs/fvwmlib.h" +-char *safemalloc(int length); + void DeadPipe(int nonsense); + void GetTargetWindow(Window *app_win); + void sleep_a_little(int n); diff --git a/x11-wm/fvwm/files/patch-FvwmWinList-Mallocs.c b/x11-wm/fvwm/files/patch-FvwmWinList-Mallocs.c new file mode 100644 index 000000000000..a0e7b3ea7e61 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmWinList-Mallocs.c @@ -0,0 +1,11 @@ +--- ./modules/FvwmWinList/Mallocs.c.orig 1994-09-14 20:07:21.000000000 +0000 ++++ ./modules/FvwmWinList/Mallocs.c 2009-03-11 09:42:43.000000000 +0000 +@@ -33,6 +33,8 @@ + #include "../../fvwm/alpha_header.h" + #endif /* NEEDS_ALPHA_HEADER */ + ++#include "Mallocs.h" ++ + extern char *Module; + + /****************************************************************************** diff --git a/x11-wm/fvwm/files/patch-FvwmWinList-Mallocs.h b/x11-wm/fvwm/files/patch-FvwmWinList-Mallocs.h new file mode 100644 index 000000000000..36c86a1bbb18 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmWinList-Mallocs.h @@ -0,0 +1,13 @@ +--- ./modules/FvwmWinList/Mallocs.h.orig 1994-09-14 14:11:34.000000000 +0000 ++++ ./modules/FvwmWinList/Mallocs.h 2009-03-11 09:42:48.000000000 +0000 +@@ -18,8 +18,9 @@ + * own risk. Permission to use this program for any purpose is given, + * as long as the copyright is kept intact. */ + ++#include "../../libs/fvwmlib.h" ++ + /* Function Prototypes */ +-char *safemalloc(int length); + char *saferealloc(char *ptr, int length); + void sleep_a_little(int n); + void CopyString(char **dest, char *source); diff --git a/x11-wm/fvwm/files/patch-FvwmWinList.c b/x11-wm/fvwm/files/patch-FvwmWinList.c new file mode 100644 index 000000000000..8b40a22fa284 --- /dev/null +++ b/x11-wm/fvwm/files/patch-FvwmWinList.c @@ -0,0 +1,19 @@ +--- ./modules/FvwmWinList/FvwmWinList.c.orig 1994-09-19 12:40:13.000000000 +0000 ++++ ./modules/FvwmWinList/FvwmWinList.c 2009-03-11 09:42:51.000000000 +0000 +@@ -101,7 +101,7 @@ + Based on main() from FvwmIdent: + Copyright 1994, Robert Nation and Nobutaka Suzuki. + ******************************************************************************/ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *temp, *s; + +@@ -153,6 +153,7 @@ + + /* Recieve all messages from Fvwm */ + EndLessLoop(); ++ return (0); + } + + /****************************************************************************** diff --git a/x11-wm/fvwm/files/patch-GoodStuff.c b/x11-wm/fvwm/files/patch-GoodStuff.c new file mode 100644 index 000000000000..35f77e92119c --- /dev/null +++ b/x11-wm/fvwm/files/patch-GoodStuff.c @@ -0,0 +1,28 @@ +--- ./modules/GoodStuff/GoodStuff.c.orig 1994-12-05 17:39:04.000000000 +0000 ++++ ./modules/GoodStuff/GoodStuff.c 2009-03-11 09:42:52.000000000 +0000 +@@ -89,7 +89,7 @@ + * + *********************************************************************** + */ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + char *display_name = NULL; + int i,j; +@@ -209,7 +209,7 @@ + SendText(fd,"Send_WindowList",0); + + Loop(); +- ++ return (0); + } + + /*********************************************************************** +@@ -396,7 +396,6 @@ + } + } + } +- return; + } + + /************************************************************************ diff --git a/x11-wm/fvwm/files/patch-GoodStuff.h b/x11-wm/fvwm/files/patch-GoodStuff.h new file mode 100644 index 000000000000..d83e8ad73e92 --- /dev/null +++ b/x11-wm/fvwm/files/patch-GoodStuff.h @@ -0,0 +1,10 @@ +--- ./modules/GoodStuff/GoodStuff.h.orig 1994-09-14 19:58:12.000000000 +0000 ++++ ./modules/GoodStuff/GoodStuff.h 2009-03-11 09:42:48.000000000 +0000 +@@ -13,7 +13,6 @@ + extern void match_string(char *tline); + extern void Loop(void); + extern void ParseOptions(char *); +-extern char *safemalloc(int length); + extern void change_window_name(char *str); + extern int My_XNextEvent(Display *dpy, XEvent *event); + extern FVWM_INLINE void RelieveWindow(Window win,int x,int y,int w,int h,GC rGC,GC sGC); diff --git a/x11-wm/fvwm/files/patch-SendInfo.c b/x11-wm/fvwm/files/patch-SendInfo.c new file mode 100644 index 000000000000..c3cc7bde6060 --- /dev/null +++ b/x11-wm/fvwm/files/patch-SendInfo.c @@ -0,0 +1,9 @@ +--- ./libs/SendInfo.c.orig 1994-09-13 18:53:14.000000000 +0000 ++++ ./libs/SendInfo.c 2009-03-11 09:42:49.000000000 +0000 +@@ -1,5 +1,6 @@ + #include <stdio.h> + #include <ctype.h> ++#include <string.h> + + /*********************************************************************** + * diff --git a/x11-wm/fvwm/files/patch-SendText.c b/x11-wm/fvwm/files/patch-SendText.c new file mode 100644 index 000000000000..2e9662f74473 --- /dev/null +++ b/x11-wm/fvwm/files/patch-SendText.c @@ -0,0 +1,10 @@ +--- ./libs/SendText.c.orig 1994-09-13 18:53:12.000000000 +0000 ++++ ./libs/SendText.c 2009-03-11 09:42:49.000000000 +0000 +@@ -1,5 +1,7 @@ + #include <stdio.h> + #include <ctype.h> ++#include <string.h> ++ + /************************************************************************ + * + * Sends arbitrary text to fvwm diff --git a/x11-wm/fvwm/files/patch-events.c b/x11-wm/fvwm/files/patch-events.c new file mode 100644 index 000000000000..b69a7256d30a --- /dev/null +++ b/x11-wm/fvwm/files/patch-events.c @@ -0,0 +1,11 @@ +--- ./fvwm/events.c.orig 1994-11-15 14:02:39.000000000 +0000 ++++ ./fvwm/events.c 2009-03-11 09:42:52.000000000 +0000 +@@ -985,7 +985,7 @@ + (MouseEntry->Modifier == (modifier& (~LockMask))))) + { + /* got a match, now process it */ +- if (MouseEntry->func != (int)NULL) ++ if (MouseEntry->func != 0) + { + Action = MouseEntry->item ? MouseEntry->item->action : NULL; + ExecuteFunction(MouseEntry->func, Action, Event.xany.window, diff --git a/x11-wm/fvwm/files/patch-fvwm.c b/x11-wm/fvwm/files/patch-fvwm.c new file mode 100644 index 000000000000..da38ad109947 --- /dev/null +++ b/x11-wm/fvwm/files/patch-fvwm.c @@ -0,0 +1,28 @@ +--- ./fvwm/fvwm.c.orig 1994-11-15 14:02:52.000000000 +0000 ++++ ./fvwm/fvwm.c 2009-03-11 09:42:51.000000000 +0000 +@@ -132,7 +132,7 @@ + * + *********************************************************************** + */ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + unsigned long valuemask; /* mask for create windows */ + XSetWindowAttributes attributes; /* attributes for create windows */ +@@ -463,7 +463,7 @@ + } + + HandleEvents(); +- return; ++ return (0); + } + + /*********************************************************************** +@@ -988,6 +988,7 @@ + #endif + + fprintf(stderr,USAGE,VERSION); ++ exit (0); + + } + diff --git a/x11-wm/fvwm/files/patch-fvwmlib.h b/x11-wm/fvwm/files/patch-fvwmlib.h new file mode 100644 index 000000000000..d1574ba1f4f0 --- /dev/null +++ b/x11-wm/fvwm/files/patch-fvwmlib.h @@ -0,0 +1,11 @@ +--- ./libs/fvwmlib.h.orig 1994-09-16 14:47:13.000000000 +0000 ++++ ./libs/fvwmlib.h 2009-03-11 09:42:44.000000000 +0000 +@@ -4,7 +4,7 @@ + int mygethostname(char *client, int namelen); + void SendText(int *fd,char *message,unsigned long window); + void SendInfo(int *fd,char *message,unsigned long window); +-char *safemalloc(int); ++void *safemalloc(unsigned int); + char *findIconFile(char *icon, char *pathlist, int type); + int ReadFvwmPacket(int fd, unsigned long *header, unsigned long **body); + void CopyString(char **dest, char *source); diff --git a/x11-wm/fvwm/files/patch-hostname.c b/x11-wm/fvwm/files/patch-hostname.c new file mode 100644 index 000000000000..f4f296b1f712 --- /dev/null +++ b/x11-wm/fvwm/files/patch-hostname.c @@ -0,0 +1,10 @@ +--- ./libs/hostname.c.orig 1994-09-22 12:37:18.000000000 +0000 ++++ ./libs/hostname.c 2009-03-11 09:42:49.000000000 +0000 +@@ -4,6 +4,7 @@ + /* define mygethostname() by using uname() */ + + #include <sys/utsname.h> ++#include <string.h> + + int mygethostname(char *client, int length) + { diff --git a/x11-wm/fvwm/files/patch-icons.c b/x11-wm/fvwm/files/patch-icons.c new file mode 100644 index 000000000000..1d552ecb115a --- /dev/null +++ b/x11-wm/fvwm/files/patch-icons.c @@ -0,0 +1,11 @@ +--- ./fvwm/icons.c.orig 1994-11-15 14:03:29.000000000 +0000 ++++ ./fvwm/icons.c 2009-03-11 09:42:52.000000000 +0000 +@@ -340,7 +340,7 @@ + if(Tmp_win->flags & SUPPRESSICON) + return; + +- if (Tmp_win->icon_w == (int)NULL) ++ if (Tmp_win->icon_w == 0) + return; + + Tmp_win->icon_t_width = XTextWidth(IconFont->font,Tmp_win->icon_name, diff --git a/x11-wm/fvwm/files/patch-mystrcasecmp.c b/x11-wm/fvwm/files/patch-mystrcasecmp.c new file mode 100644 index 000000000000..f42280b2efe0 --- /dev/null +++ b/x11-wm/fvwm/files/patch-mystrcasecmp.c @@ -0,0 +1,10 @@ +--- ./libs/mystrcasecmp.c.orig 1994-09-14 15:55:20.000000000 +0000 ++++ ./libs/mystrcasecmp.c 2009-03-11 09:42:49.000000000 +0000 +@@ -1,6 +1,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <ctype.h> ++#include <string.h> + + int mystrcasecmp(char *s1,char *s2) + { diff --git a/x11-wm/fvwm/files/patch-root_bits.c b/x11-wm/fvwm/files/patch-root_bits.c new file mode 100644 index 000000000000..6a30dc6d7c5b --- /dev/null +++ b/x11-wm/fvwm/files/patch-root_bits.c @@ -0,0 +1,10 @@ +--- ./modules/FvwmBacker/root_bits.c.orig 1994-09-16 12:36:23.000000000 +0000 ++++ ./modules/FvwmBacker/root_bits.c 2009-03-11 09:42:51.000000000 +0000 +@@ -38,6 +38,7 @@ + #include <X11/Xutil.h> + #include <X11/Xatom.h> + #include <stdio.h> ++#include <stdlib.h> + #include "X11/bitmaps/gray" + + char *index(); diff --git a/x11-wm/fvwm/files/patch-safemalloc.c b/x11-wm/fvwm/files/patch-safemalloc.c new file mode 100644 index 000000000000..80a84019828f --- /dev/null +++ b/x11-wm/fvwm/files/patch-safemalloc.c @@ -0,0 +1,21 @@ +--- ./libs/safemalloc.c.orig 1994-09-13 19:38:01.000000000 +0000 ++++ ./libs/safemalloc.c 2009-03-11 09:42:44.000000000 +0000 +@@ -8,15 +8,15 @@ + * problem + * + ***********************************************************************/ +-char *safemalloc(int length) ++void *safemalloc(unsigned int length) + { +- char *ptr; ++ void *ptr; + + if(length <= 0) + length = 1; + + ptr = malloc(length); +- if(ptr == (char *)0) ++ if(ptr == NULL) + { + fprintf(stderr,"malloc of %d bytes failed. Exiting\n",length); + exit(1); diff --git a/x11-wm/fvwm/files/patch-xpmroot.c b/x11-wm/fvwm/files/patch-xpmroot.c new file mode 100644 index 000000000000..16d33c9f12f5 --- /dev/null +++ b/x11-wm/fvwm/files/patch-xpmroot.c @@ -0,0 +1,10 @@ +--- ./xpmroot/xpmroot.c.orig 1994-11-15 14:06:38.000000000 +0000 ++++ ./xpmroot/xpmroot.c 2009-03-11 09:42:51.000000000 +0000 +@@ -11,6 +11,7 @@ + #include <stdio.h> + #include <signal.h> + #include <string.h> ++#include <stdlib.h> + #include <X11/Xos.h> + #include <X11/Xatom.h> + #include <X11/xpm.h> |