aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2014-10-07 20:25:49 +0800
committergahr <gahr@FreeBSD.org>2014-10-07 20:25:49 +0800
commite1f71424c63e6f34afec9edce4c4322d9a0a1826 (patch)
tree21dd1055343a14db0b8d00f86625c678d7320bfc
parent7a3cc16bc39813eafdf29d67130e5fcd41f42855 (diff)
downloadfreebsd-ports-gnome-e1f71424c63e6f34afec9edce4c4322d9a0a1826.tar.gz
freebsd-ports-gnome-e1f71424c63e6f34afec9edce4c4322d9a0a1826.tar.zst
freebsd-ports-gnome-e1f71424c63e6f34afec9edce4c4322d9a0a1826.zip
- Chase compiler warnings, upstream: https://savannah.nongnu.org/bugs/?42945
-rw-r--r--devel/ftjam/Makefile5
-rw-r--r--devel/ftjam/files/patch-builtins.c108
-rw-r--r--devel/ftjam/files/patch-compile.c32
-rw-r--r--devel/ftjam/files/patch-execunix.c34
-rw-r--r--devel/ftjam/files/patch-expand.c52
-rw-r--r--devel/ftjam/files/patch-fileunix.c23
-rw-r--r--devel/ftjam/files/patch-hash.c19
-rw-r--r--devel/ftjam/files/patch-hdrmacro.c23
-rw-r--r--devel/ftjam/files/patch-headers.c10
-rw-r--r--devel/ftjam/files/patch-jam.c11
-rw-r--r--devel/ftjam/files/patch-lists.c11
-rw-r--r--devel/ftjam/files/patch-make.c47
-rw-r--r--devel/ftjam/files/patch-make1.c21
-rw-r--r--devel/ftjam/files/patch-mkjambase.c11
-rw-r--r--devel/ftjam/files/patch-newstr.c10
-rw-r--r--devel/ftjam/files/patch-pathunix.c19
-rw-r--r--devel/ftjam/files/patch-rules.c20
-rw-r--r--devel/ftjam/files/patch-search.c20
-rw-r--r--devel/ftjam/files/patch-variable.c35
19 files changed, 509 insertions, 2 deletions
diff --git a/devel/ftjam/Makefile b/devel/ftjam/Makefile
index ed3f465548b7..24ee4b5d93e7 100644
--- a/devel/ftjam/Makefile
+++ b/devel/ftjam/Makefile
@@ -11,7 +11,8 @@ COMMENT= Small build tool that can be used as a replacement for make(1)
OPTIONS_DEFINE= DOCS
-USES= gmake tar:bzip2
+USES= dos2unix gmake tar:bzip2
+DOS2UNIX_GLOB= *.c
PORTDOCS= Jam.html \
Jambase.html \
@@ -23,7 +24,7 @@ PORTDOCS= Jam.html \
PLIST_FILES= bin/${PORTNAME}
-do-configure:
+post-patch:
@${REINPLACE_CMD} -e '/^CC/s|=|?=|; /^CFLAGS/s|=|?=|' \
${BUILD_WRKSRC}/${MAKEFILE}
diff --git a/devel/ftjam/files/patch-builtins.c b/devel/ftjam/files/patch-builtins.c
new file mode 100644
index 000000000000..8bcb699789cb
--- /dev/null
+++ b/devel/ftjam/files/patch-builtins.c
@@ -0,0 +1,108 @@
+--- builtins.c.orig 2006-06-05 12:52:18.000000000 +0200
++++ builtins.c 2014-08-07 15:35:40.000000000 +0200
+@@ -134,9 +134,10 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)jmp;
++
+ LIST *targets = lol_get( args, 0 );
+ LIST *sources = lol_get( args, 1 );
+- int which = parse->num;
+ LIST *l;
+
+ for( l = targets; l; l = list_next( l ) )
+@@ -173,6 +174,9 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)parse;
++ (void)jmp;
++
+ list_print( lol_get( args, 0 ) );
+ printf( "\n" );
+ return L0;
+@@ -191,6 +195,9 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)parse;
++ (void)jmp;
++
+ list_print( lol_get( args, 0 ) );
+ printf( "\n" );
+ exit( EXITBAD ); /* yeech */
+@@ -210,6 +217,9 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)parse;
++ (void)jmp;
++
+ LIST *l = lol_get( args, 0 );
+
+ for( ; l; l = list_next( l ) )
+@@ -234,6 +244,9 @@
+ int status,
+ time_t time )
+ {
++ (void)status;
++ (void)time;
++
+ struct globbing *globbing = (struct globbing *)closure;
+ LIST *l;
+ PATHNAME f;
+@@ -260,6 +273,9 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)parse;
++ (void)jmp;
++
+ LIST *l = lol_get( args, 0 );
+ LIST *r = lol_get( args, 1 );
+
+@@ -284,6 +300,9 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)parse;
++ (void)jmp;
++
+ LIST *l, *r;
+ LIST *result = 0;
+
+@@ -332,19 +351,22 @@
+ LOL *args,
+ int *jmp )
+ {
+- LIST* l = lol_get( args, 0 );
++ (void)parse;
++ (void)jmp;
+
+- for ( ; l; l = list_next(l) )
+- {
+- TARGET* t = bindtarget( l->string );
++ LIST* l = lol_get( args, 0 );
+
+- /* scan file for header filename macro definitions */
+- if ( DEBUG_HEADER )
+- printf( "scanning '%s' for header file macro definitions\n",
+- l->string );
++ for ( ; l; l = list_next(l) )
++ {
++ TARGET* t = bindtarget( l->string );
+
+- macro_headers( t );
+- }
++ /* scan file for header filename macro definitions */
++ if ( DEBUG_HEADER )
++ printf( "scanning '%s' for header file macro definitions\n",
++ l->string );
+
+- return L0;
++ macro_headers( t );
++ }
++
++ return L0;
+ }
diff --git a/devel/ftjam/files/patch-compile.c b/devel/ftjam/files/patch-compile.c
new file mode 100644
index 000000000000..80f801a6cbd1
--- /dev/null
+++ b/devel/ftjam/files/patch-compile.c
@@ -0,0 +1,32 @@
+--- compile.c.orig 2014-08-07 15:35:58.000000000 +0200
++++ compile.c 2014-08-07 15:36:52.000000000 +0200
+@@ -371,6 +371,8 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)jmp;
++
+ /* voodoo 1 means: s is a copyable string */
+ const char *s = parse->string;
+ return var_expand( L0, s, s + strlen( s ), args, 1 );
+@@ -434,6 +436,10 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)parse;
++ (void)args;
++ (void)jmp;
++
+ return L0;
+ }
+
+@@ -692,6 +698,9 @@
+ LOL *args,
+ int *jmp )
+ {
++ (void)args;
++ (void)jmp;
++
+ RULE *rule = bindrule( parse->string );
+ LIST *params = 0;
+ PARSE *p;
diff --git a/devel/ftjam/files/patch-execunix.c b/devel/ftjam/files/patch-execunix.c
new file mode 100644
index 000000000000..51a60de3af42
--- /dev/null
+++ b/devel/ftjam/files/patch-execunix.c
@@ -0,0 +1,34 @@
+--- execunix.c.orig 2006-06-05 12:52:27.000000000 +0200
++++ execunix.c 2014-08-07 15:38:48.000000000 +0200
+@@ -45,6 +45,13 @@
+
+ # ifdef USE_EXECUNIX
+
++
++# ifdef OS_FREEBSD
++# include <unistd.h>
++# include <sys/types.h>
++# include <sys/wait.h>
++# endif
++
+ # ifdef OS_OS2
+ # define USE_EXECNT
+ # include <process.h>
+@@ -85,6 +92,8 @@
+ void
+ onintr( int disp )
+ {
++ (void)disp;
++
+ intr++;
+ printf( "...interrupted\n" );
+ }
+@@ -231,7 +240,7 @@
+ # else
+ if ((pid = vfork()) == 0)
+ {
+- execvp( argv[0], argv );
++ execvp( argv[0], (char * const *)argv );
+ _exit(127);
+ }
+ # endif
diff --git a/devel/ftjam/files/patch-expand.c b/devel/ftjam/files/patch-expand.c
new file mode 100644
index 000000000000..ff0483e784ea
--- /dev/null
+++ b/devel/ftjam/files/patch-expand.c
@@ -0,0 +1,52 @@
+--- expand.c.orig 2014-08-07 15:13:43.000000000 +0200
++++ expand.c 2014-08-07 15:16:26.000000000 +0200
+@@ -83,7 +83,7 @@
+ int depth;
+
+ if( DEBUG_VAREXP )
+- printf( "expand '%.*s'\n", end - in, in );
++ printf( "expand '%.*s'\n", (int)(end - in), in );
+
+ /* This gets alot of cases: $(<) and $(>) */
+
+@@ -210,7 +210,7 @@
+
+ strcpy( varname, vars->string );
+
+- if( colon = strchr( varname, MAGIC_COLON ) )
++ if( ( colon = strchr( varname, MAGIC_COLON ) ) )
+ {
+ *colon = '\0';
+ var_edit_parse( colon + 1, &edits );
+@@ -220,11 +220,11 @@
+ /* sub1 is x (0 default) */
+ /* sub2 is length (-1 means forever) */
+
+- if( bracket = strchr( varname, MAGIC_LEFT ) )
++ if( ( bracket = strchr( varname, MAGIC_LEFT ) ) )
+ {
+ char *dash;
+
+- if( dash = strchr( bracket + 1, '-' ) )
++ if( ( dash = strchr( bracket + 1, '-' ) ) )
+ *dash = '\0';
+
+ sub1 = atoi( bracket + 1 ) - 1;
+@@ -454,7 +454,7 @@
+ fp->ptr = "";
+ fp->len = 0;
+ }
+- else if( p = strchr( mods, MAGIC_COLON ) )
++ else if( ( p = strchr( mods, MAGIC_COLON ) ) )
+ {
+ *p = 0;
+ fp->ptr = ++mods;
+@@ -544,7 +544,7 @@
+ var_edit_quote( char *out )
+ {
+ /* Handle quoting now */
+- int count, len;
++ int count;
+ char* p = out;
+ char* q;
+
diff --git a/devel/ftjam/files/patch-fileunix.c b/devel/ftjam/files/patch-fileunix.c
new file mode 100644
index 000000000000..4766592cf5d8
--- /dev/null
+++ b/devel/ftjam/files/patch-fileunix.c
@@ -0,0 +1,23 @@
+--- fileunix.c.orig 2014-08-07 15:16:40.000000000 +0200
++++ fileunix.c 2014-08-07 15:18:11.000000000 +0200
+@@ -51,6 +51,11 @@
+ # include <sys/stat.h>
+ # endif
+
++# if defined( OS_FREEBSD )
++# include <sys/types.h>
++# include <unistd.h>
++# endif
++
+ # if defined( OS_RHAPSODY ) || \
+ defined( OS_MACOSX ) || \
+ defined( OS_NEXT )
+@@ -141,7 +146,7 @@
+ if( DEBUG_BINDSCAN )
+ printf( "scan directory %s\n", dir );
+
+- while( dirent = readdir( d ) )
++ while( ( dirent = readdir( d ) ) )
+ {
+ # ifdef old_sinix
+ /* Broken structure definition on sinix. */
diff --git a/devel/ftjam/files/patch-hash.c b/devel/ftjam/files/patch-hash.c
new file mode 100644
index 000000000000..10f8cf09cd3d
--- /dev/null
+++ b/devel/ftjam/files/patch-hash.c
@@ -0,0 +1,19 @@
+--- hash.c.orig 2014-08-07 15:18:25.000000000 +0200
++++ hash.c 2014-08-07 15:19:06.000000000 +0200
+@@ -239,14 +239,14 @@
+
+ for( i = nel; i > 0; i-- )
+ {
+- if( here = ( *tab++ != (ITEM *)0 ) )
++ if( ( here = ( *tab++ != (ITEM *)0 ) ) )
+ count++;
+ if( here && !run )
+ sets++;
+ run = here;
+ }
+
+- printf( "%s table: %d+%d+%d (%dK+%dK) items+table+hash, %f density\n",
++ printf( "%s table: %d+%d+%d (%dK+%zuK) items+table+hash, %f density\n",
+ hp->name,
+ count,
+ hp->items.nel,
diff --git a/devel/ftjam/files/patch-hdrmacro.c b/devel/ftjam/files/patch-hdrmacro.c
new file mode 100644
index 000000000000..6f702df83fc6
--- /dev/null
+++ b/devel/ftjam/files/patch-hdrmacro.c
@@ -0,0 +1,23 @@
+--- hdrmacro.c.orig 2014-08-07 15:19:17.000000000 +0200
++++ hdrmacro.c 2014-08-07 15:23:19.000000000 +0200
+@@ -39,8 +39,6 @@
+ * just to invoke a rule.
+ */
+
+-static LIST *header_macros1( LIST *l, char *file, int rec, regexp *re[] );
+-
+ /* this type is used to store a dictionary of file header macros */
+ typedef struct header_macro
+ {
+@@ -60,11 +58,9 @@
+ void
+ macro_headers( TARGET *t )
+ {
+- LIST *hdrrule;
+ regexp *re;
+ FILE *f;
+ char buf[ 1024 ];
+- int i;
+
+ if ( DEBUG_HEADER )
+ printf( "macro header scan for %s\n", t->name );
diff --git a/devel/ftjam/files/patch-headers.c b/devel/ftjam/files/patch-headers.c
new file mode 100644
index 000000000000..2082034db07a
--- /dev/null
+++ b/devel/ftjam/files/patch-headers.c
@@ -0,0 +1,10 @@
+--- headers.c.orig 2014-08-07 15:23:32.000000000 +0200
++++ headers.c 2014-08-07 15:23:38.000000000 +0200
+@@ -53,7 +53,6 @@
+ {
+ LIST *hdrscan;
+ LIST *hdrrule;
+- LIST *hdrcache;
+ LOL lol;
+
+ if( !( hdrscan = var_get( "HDRSCAN" ) ) ||
diff --git a/devel/ftjam/files/patch-jam.c b/devel/ftjam/files/patch-jam.c
new file mode 100644
index 000000000000..8e144c67a2ea
--- /dev/null
+++ b/devel/ftjam/files/patch-jam.c
@@ -0,0 +1,11 @@
+--- jam.c.orig 2014-08-07 15:39:04.000000000 +0200
++++ jam.c 2014-08-07 15:39:24.000000000 +0200
+@@ -167,7 +167,7 @@
+ # endif
+
+ int
+-main( int argc, char **argv, char **arg_environ )
++main( int argc, char **argv )
+ {
+ int n, num_targets;
+ const char *s;
diff --git a/devel/ftjam/files/patch-lists.c b/devel/ftjam/files/patch-lists.c
new file mode 100644
index 000000000000..307f390c9f50
--- /dev/null
+++ b/devel/ftjam/files/patch-lists.c
@@ -0,0 +1,11 @@
+--- lists.c.orig 2014-08-07 15:25:31.000000000 +0200
++++ lists.c 2014-08-07 15:26:01.000000000 +0200
+@@ -190,7 +190,7 @@
+
+ /* Any embedded "'s? Escape them */
+
+- while( p = (char *)memchr( op, '"', ep - op ) )
++ while( ( p = (char *)memchr( op, '"', ep - op ) ) )
+ {
+ fwrite( op, p - op, 1, out );
+ fputc( '\\', out );
diff --git a/devel/ftjam/files/patch-make.c b/devel/ftjam/files/patch-make.c
new file mode 100644
index 000000000000..2817bb57838f
--- /dev/null
+++ b/devel/ftjam/files/patch-make.c
@@ -0,0 +1,47 @@
+--- make.c.orig 2014-08-07 15:26:13.000000000 +0200
++++ make.c 2014-08-07 15:27:53.000000000 +0200
+@@ -69,6 +69,10 @@
+ # define max( a,b ) ((a)>(b)?(a):(b))
+ # endif
+
++# if defined ( OS_FREEBSD )
++# include <unistd.h> // unlink(2)
++# endif
++
+ typedef struct {
+ int temp;
+ int updating;
+@@ -169,7 +173,7 @@
+ COUNTS *counts, /* for reporting */
+ int anyhow ) /* forcibly touch all (real) targets */
+ {
+- TARGETS *c, *d, *incs;
++ TARGETS *c, *incs;
+ TARGET *ptime = t;
+ time_t last, leaf, hlast;
+ int fate;
+@@ -246,7 +250,7 @@
+ case T_BIND_MISSING:
+ case T_BIND_PARENTS:
+ printf( "time\t--\t%s%s: %s\n",
+- spaces( depth ), t->name, target_bind[ t->binding ] );
++ spaces( depth ), t->name, target_bind[ (int)t->binding ] );
+ break;
+
+ case T_BIND_EXISTS:
+@@ -481,13 +485,13 @@
+
+ if( DEBUG_MAKEPROG )
+ printf( "made%s\t%s\t%s%s\n",
+- flag, target_fate[ t->fate ],
++ flag, target_fate[ (int)t->fate ],
+ spaces( depth ), t->name );
+
+ if( DEBUG_CAUSES &&
+ t->fate >= T_FATE_NEWER &&
+ t->fate <= T_FATE_MISSING )
+- printf( "%s %s\n", target_fate[ t->fate ], t->name );
++ printf( "%s %s\n", target_fate[ (int)t->fate ], t->name );
+ }
+
+ /*
diff --git a/devel/ftjam/files/patch-make1.c b/devel/ftjam/files/patch-make1.c
new file mode 100644
index 000000000000..a2756eb77da4
--- /dev/null
+++ b/devel/ftjam/files/patch-make1.c
@@ -0,0 +1,21 @@
+--- make1.c.orig 2014-08-07 15:28:04.000000000 +0200
++++ make1.c 2014-08-07 15:28:43.000000000 +0200
+@@ -62,6 +62,10 @@
+ # include "command.h"
+ # include "execcmd.h"
+
++# if defined ( OS_FREEBSD )
++# include <unistd.h> // unlink(2)
++# endif
++
+ static void make1a( TARGET *t, TARGET *parent );
+ static void make1b( TARGET *t );
+ static void make1c( TARGET *t );
+@@ -426,7 +430,6 @@
+ SETTINGS *boundvars;
+ LIST *nt, *ns;
+ ACTIONS *a1;
+- CMD *cmd;
+ int start, chunk, length, maxline;
+
+ /* Only do rules with commands to execute. */
diff --git a/devel/ftjam/files/patch-mkjambase.c b/devel/ftjam/files/patch-mkjambase.c
new file mode 100644
index 000000000000..c125b3506981
--- /dev/null
+++ b/devel/ftjam/files/patch-mkjambase.c
@@ -0,0 +1,11 @@
+--- mkjambase.c.orig 2014-08-07 15:44:34.000000000 +0200
++++ mkjambase.c 2014-08-07 15:44:46.000000000 +0200
+@@ -24,7 +24,7 @@
+ # include <stdio.h>
+ # include <string.h>
+
+-main( int argc, char **argv, char **envp )
++int main( int argc, char **argv, char **envp )
+ {
+ char buf[ 1024 ];
+ FILE *fin;
diff --git a/devel/ftjam/files/patch-newstr.c b/devel/ftjam/files/patch-newstr.c
new file mode 100644
index 000000000000..5da67e9a7ad9
--- /dev/null
+++ b/devel/ftjam/files/patch-newstr.c
@@ -0,0 +1,10 @@
+--- newstr.c.orig 2014-08-07 15:39:56.000000000 +0200
++++ newstr.c 2014-08-07 15:40:34.000000000 +0200
+@@ -82,6 +82,7 @@
+ void
+ freestr( const char *s )
+ {
++ (void)s; // is this supposed to be free(s); ?
+ }
+
+ /*
diff --git a/devel/ftjam/files/patch-pathunix.c b/devel/ftjam/files/patch-pathunix.c
new file mode 100644
index 000000000000..6003463806ff
--- /dev/null
+++ b/devel/ftjam/files/patch-pathunix.c
@@ -0,0 +1,19 @@
+--- pathunix.c.orig 2006-06-05 12:52:12.000000000 +0200
++++ pathunix.c 2014-08-07 15:41:24.000000000 +0200
+@@ -110,7 +110,7 @@
+ p = 0;
+ q = file;
+
+- while( q = (char *)memchr( q, '.', end - q ) )
++ while( ( q = (char *)memchr( q, '.', end - q ) ) )
+ p = q++;
+
+ if( p )
+@@ -136,6 +136,7 @@
+ char *file,
+ int binding )
+ {
++ (void)binding;
+ /* Start with the grist. If the current grist isn't */
+ /* surrounded by <>'s, add them. */
+
diff --git a/devel/ftjam/files/patch-rules.c b/devel/ftjam/files/patch-rules.c
new file mode 100644
index 000000000000..76e9460ea6a8
--- /dev/null
+++ b/devel/ftjam/files/patch-rules.c
@@ -0,0 +1,20 @@
+--- rules.c.orig 2014-08-07 15:29:24.000000000 +0200
++++ rules.c 2014-08-07 15:29:43.000000000 +0200
+@@ -185,8 +185,6 @@
+ TARGETS *chain,
+ TARGETS *targets )
+ {
+- TARGETS *c;
+-
+ if( !targets )
+ return chain;
+ else if( !chain )
+@@ -297,7 +295,7 @@
+ SETTINGS *
+ copysettings( SETTINGS *from )
+ {
+- SETTINGS *head = 0, *v;
++ SETTINGS *head = 0;
+
+ for( ; from; from = from->next )
+ {
diff --git a/devel/ftjam/files/patch-search.c b/devel/ftjam/files/patch-search.c
new file mode 100644
index 000000000000..40d0e1a784ae
--- /dev/null
+++ b/devel/ftjam/files/patch-search.c
@@ -0,0 +1,20 @@
+--- search.c.orig 2014-08-07 15:30:23.000000000 +0200
++++ search.c 2014-08-07 15:30:50.000000000 +0200
+@@ -34,7 +34,7 @@
+ f->f_grist.ptr = 0;
+ f->f_grist.len = 0;
+
+- if( varlist = var_get( "LOCATE" ) )
++ if( ( varlist = var_get( "LOCATE" ) ) )
+ {
+ f->f_root.ptr = varlist->string;
+ f->f_root.len = strlen( varlist->string );
+@@ -48,7 +48,7 @@
+
+ return newstr( buf );
+ }
+- else if( varlist = var_get( "SEARCH" ) )
++ else if( ( varlist = var_get( "SEARCH" ) ) )
+ {
+ while( varlist )
+ {
diff --git a/devel/ftjam/files/patch-variable.c b/devel/ftjam/files/patch-variable.c
new file mode 100644
index 000000000000..a8b20e626efb
--- /dev/null
+++ b/devel/ftjam/files/patch-variable.c
@@ -0,0 +1,35 @@
+--- variable.c.orig 2006-06-05 12:52:08.000000000 +0200
++++ variable.c 2014-08-07 15:43:50.000000000 +0200
+@@ -88,7 +88,7 @@
+
+ if( ( val = strchr( *e, '=' ) ) || ( val = *e + strlen( *e ) ) )
+ # else
+- if( val = strchr( *e, '=' ) )
++ if( ( val = strchr( *e, '=' ) ) )
+ # endif
+ {
+ LIST *l = L0;
+@@ -112,11 +112,11 @@
+
+ /* Do the split */
+
+- for( pp = val + 1; p = strchr( pp, split ); pp = p + 1 )
++ for( pp = val + 1; ( p = strchr( pp, split ) ); pp = p + 1 )
+ {
+- int len = p - pp;
++ size_t len = p - pp;
+
+- if ( len >= sizeof(buf) )
++ if ( ( len >= sizeof(buf) ) )
+ len = sizeof(buf)-1;
+
+ strncpy( buf, pp, len );
+@@ -203,7 +203,7 @@
+
+ /* Separate with space */
+
+- if( l = list_next( l ) )
++ if( ( l = list_next( l ) ) )
+ *out++ = ' ';
+ }
+