Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2002 18:21:31 GMT
From:      GuRU <guru@goku.cl.msu.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/44445: ports/gtkballs fails to build
Message-ID:  <200210241821.g9OILVFD022401@goku.cl.msu.edu>

next in thread | raw e-mail | index | archive | help

>Number:         44445
>Category:       ports
>Synopsis:       ports/gtkballs fails to build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 24 15:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     GuRU
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
MSU Computer Laboratory - Information Systems Group
>Environment:
System: FreeBSD goku.cl.msu.edu 5.0-CURRENT FreeBSD 5.0-CURRENT #25: Wed Oct 23 23:16:26 GMT 2002 root@goku.cl.msu.edu:/usr/src/sys/i386/compile/GOKOU i386


	
>Description:
	
	ports/gtkballs fails to build with the following compile error
	tkballs\" -DLOCALEDIR=\"/usr/local/share/locale\" -c themerc.c
	themerc.c: In function `trc_open':
	themerc.c:21: syntax error before string constant
	themerc.c:26: syntax error before string constant
	themerc.c:31: syntax error before string constant
	themerc.c:36: syntax error before string constant
	themerc.c:43: syntax error before string constant
	themerc.c:45: syntax error before string constant
	themerc.c: In function `trc_get_str':
	themerc.c:69: syntax error before string constant
	themerc.c:73: syntax error before string constant

>How-To-Repeat:
	
	cd /usr/ports/games/gtkballs
	make

>Fix:

	
	Fprintf() in themerc.c took an extra argument that FreeBSD does'nt support.  I applied the
	following patch

--- src/themerc.c.orig	Mon Aug 19 11:43:39 2002
+++ src/themerc.c	Thu Oct 24 17:55:29 2002
@@ -18,31 +18,31 @@
         gchar *rc,**rcs;
 
         if((fd=open(fname, O_RDONLY))==-1) {
-                fprintf(stderr, __func__ ": open() %s failed: %s\n", fname, strerror(errno));
+                fprintf(stderr, ": open() %s failed: %s\n", fname, strerror(errno));
                 return NULL;
         }
         if((fstat(fd, &fds))==-1) {
                 close(fd);
-                fprintf(stderr, __func__ ": fstat() failed: %s\n", strerror(errno));
+                fprintf(stderr, ": fstat() failed: %s\n", strerror(errno));
                 return NULL;
         }
         if(!(fds.st_size)) {
                 close(fd);
-                fprintf(stderr, __func__ ": zero length file.\n");
+                fprintf(stderr, ": zero length file.\n");
                 return NULL;
         }
         if(!(rc=malloc(fds.st_size+1))) {
                 close(fd);
-                fprintf(stderr, __func__ ": malloc() failed: cannot alloc %d bytes\n", (int)fds.st_size);
+                fprintf(stderr, ": malloc() failed: cannot alloc %d bytes\n", (int)fds.st_size);
                 return NULL;
         }
         if((rb=read(fd, rc, fds.st_size))!=fds.st_size) {
                 free(rc);
                 close(fd);
                 if(rb==-1) {
-                	fprintf(stderr, __func__ ": read() failed: %s\n", strerror(errno));
+                	fprintf(stderr, ": read() failed: %s\n", strerror(errno));
                 } else {
-                	fprintf(stderr, __func__ ": read() reads less bytes than expected =/\n");
+                	fprintf(stderr, ": read() reads less bytes than expected =/\n");
                 }
                 return NULL;
         }
@@ -66,11 +66,11 @@
         gchar **strval,*val;
 
         if(!rcs) {
-        	fprintf(stderr, __func__ " called with uninitialised rcs. strange. \n");
+        	fprintf(stderr, " called with uninitialised rcs. strange. \n");
 		return NULL;
         }
         if(!param) {
-        	fprintf(stderr, __func__ " called with NULL param. strange. \n");
+        	fprintf(stderr, " called with NULL param. strange. \n");
 		return NULL;
         }
         for(i=0;rcs[i];i++) {


It may not be the correct way to fix it, so please have the maintainer check why the function had
the "__func__" argument in fprintf().

#:D
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210241821.g9OILVFD022401>