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 Fix: Fprintf() in themerc.c took an extra argument that FreeBSD does'nt support. I applied the following patch 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--GlwcuF9RwcBAmBwUSciyj3sYeciHRop7vXdessxh7evTuTpA Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- 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++) { How-To-Repeat: cd /usr/ports/games/gtkballs make
On Thu, Oct 24, 2002 at 06:21:31PM +0000, GuRU wrote: > - fprintf(stderr, __func__ ": open() %s failed: %s\n", fname, strerror(errno)); > + fprintf(stderr, ": open() %s failed: %s\n", fname, strerror(errno)); I think it should be replaced with fprintf(stderr, __FUNCTION__": open() %s failed: %s\n", fname, strerror(errno)); or even better: fprintf(stderr, "%s: open() %s failed: %s\n", __FUNCTION__, fname, strerror(errno)); ^--- this compiles without warnings Please don't forget to give this feedback to the author of gtkballs. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/weblog.php bash$ :(){ :|:&};: | Interested in MUDs? http://www.FatalDimensions.org/
Responsible Changed From-To: freebsd-ports->edwin I'll handle it with guru.
State Changed From-To: open->closed Commited (with some changes), thanks!