ports/158548: [PATCH] fix graphics/svgalib to build using clang
Niclas Zeising
niclas.zeising at gmail.com
Fri Jul 1 00:00:21 UTC 2011
>Number: 158548
>Category: ports
>Synopsis: [PATCH] fix graphics/svgalib to build using clang
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jul 01 00:00:20 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Niclas Zeising
>Release: FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD vincent.daemonic.se 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Wed Apr 20 17:22:47 CEST 2011 root at vincent.daemonic.se:/usr/obj/usr/src/sys/VINCENT amd64
>Description:
>How-To-Repeat:
>Fix:
Attached patch makes graphics/svgalib build using clang. It changes a number of main functions in what I assume is utility programs to return int instead of void, as per the C standard.
--- graphics.svgalib.clangfix.diff begins here ---
Index: files/patch-utils-convfont.c
===================================================================
RCS file: files/patch-utils-convfont.c
diff -N files/patch-utils-convfont.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-utils-convfont.c 30 Jun 2011 23:52:14 -0000
@@ -0,0 +1,11 @@
+--- utils/convfont.c.orig 2011-07-01 01:39:01.000000000 +0200
++++ utils/convfont.c 2011-07-01 01:39:11.000000000 +0200
+@@ -14,7 +14,7 @@
+ FILE *tf;
+
+
+-void
++int
+ main (int argc, char **argv)
+ {
+ int i;
Index: files/patch-utils-fix132x43.c
===================================================================
RCS file: files/patch-utils-fix132x43.c
diff -N files/patch-utils-fix132x43.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-utils-fix132x43.c 30 Jun 2011 23:52:14 -0000
@@ -0,0 +1,11 @@
+--- utils/fix132x43.c.orig 2011-07-01 01:43:39.000000000 +0200
++++ utils/fix132x43.c 2011-07-01 01:43:55.000000000 +0200
+@@ -54,7 +54,7 @@
+ static void fixfont (int);
+
+
+-void
++int
+ main (int argc, char *argv[])
+ {
+ int vgaIOBase;
Index: files/patch-utils-gtf-gtfcalc.c
===================================================================
RCS file: /home/ncvs/ports/graphics/svgalib/files/patch-utils-gtf-gtfcalc.c,v
retrieving revision 1.1
diff -u -d -r1.1 patch-utils-gtf-gtfcalc.c
--- files/patch-utils-gtf-gtfcalc.c 7 Feb 2007 17:06:01 -0000 1.1
+++ files/patch-utils-gtf-gtfcalc.c 30 Jun 2011 23:52:14 -0000
@@ -1,5 +1,5 @@
---- utils/gtf/gtfcalc.c.orig Tue Jan 23 12:48:50 2007
-+++ utils/gtf/gtfcalc.c Tue Jan 23 12:49:18 2007
+--- utils/gtf/gtfcalc.c.orig 1999-07-17 14:13:02.000000000 +0200
++++ utils/gtf/gtfcalc.c 2011-07-01 01:48:14.000000000 +0200
@@ -45,6 +45,7 @@
#include <string.h>
#include <ctype.h>
@@ -21,3 +21,12 @@
static void GetInternalConstants(GTF_constants *c)
/****************************************************************************
+@@ -329,7 +332,7 @@
+
+ #ifdef TESTING_GTF
+
+-void main(int argc,char *argv[])
++int main(int argc,char *argv[])
+ {
+ FILE *f;
+ double xPixels,yPixels,freq;
Index: files/patch-utils-restorefont.c
===================================================================
RCS file: files/patch-utils-restorefont.c
diff -N files/patch-utils-restorefont.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-utils-restorefont.c 30 Jun 2011 23:52:14 -0000
@@ -0,0 +1,11 @@
+--- utils/restorefont.c.orig 2011-07-01 01:35:42.000000000 +0200
++++ utils/restorefont.c 2011-07-01 01:36:05.000000000 +0200
+@@ -11,7 +11,7 @@
+ * given up). This means that there is no major security hole lurking here.
+ */
+
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+ FILE *f;
+ unsigned char *font;
Index: files/patch-utils-restorepalette.c
===================================================================
RCS file: files/patch-utils-restorepalette.c
diff -N files/patch-utils-restorepalette.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-utils-restorepalette.c 30 Jun 2011 23:52:14 -0000
@@ -0,0 +1,11 @@
+--- utils/restorepalette.c.orig 2011-07-01 01:41:50.000000000 +0200
++++ utils/restorepalette.c 2011-07-01 01:42:17.000000000 +0200
+@@ -105,7 +105,7 @@
+ }
+ }
+
+-void
++int
+ main (int argc, char *argv[])
+ {
+ int i;
Index: files/patch-utils-restoretextmode.c
===================================================================
RCS file: files/patch-utils-restoretextmode.c
diff -N files/patch-utils-restoretextmode.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-utils-restoretextmode.c 30 Jun 2011 23:52:14 -0000
@@ -0,0 +1,11 @@
+--- utils/restoretextmode.c.orig 2011-07-01 01:40:19.000000000 +0200
++++ utils/restoretextmode.c 2011-07-01 01:40:32.000000000 +0200
+@@ -14,7 +14,7 @@
+
+ unsigned char regs[MAX_REGS];
+
+-void
++int
+ main (int argc, char *argv[])
+ {
+ vga_init ();
Index: files/patch-utils-setmclk.c
===================================================================
RCS file: files/patch-utils-setmclk.c
diff -N files/patch-utils-setmclk.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-utils-setmclk.c 30 Jun 2011 23:52:14 -0000
@@ -0,0 +1,13 @@
+--- utils/setmclk.c.orig 2011-07-01 01:44:52.000000000 +0200
++++ utils/setmclk.c 2011-07-01 01:45:20.000000000 +0200
+@@ -41,8 +41,8 @@
+ #include <vga.h>
+ #include "../src/libvga.h" /* For port I/O macros. */
+
+-void
+-main (void)
++int
++main(void)
+ {
+ vga_init ();
+ if (vga_getcurrentchipset () != CIRRUS)
--- graphics.svgalib.clangfix.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list