[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update: devel/gputils



PORT: devel/gputils

LOCATION: diff attached

DESCRIPTION: GNU PIC assembler and utilities

COMMENT:
Updated to 0.12.0

Tested on
alpha
i386



Regards,
Andrew Dalgleish
http://www.ajd.net.au/
? README
Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- Makefile	14 Jan 2004 22:19:28 -0000	1.2
+++ Makefile	26 Jan 2004 00:01:18 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=		"GNU PIC assembler and utilities"
 
-VERSION=		0.11.8
+VERSION=		0.12.0
 DISTNAME=		gputils-${VERSION}
 DIST_SUBDIR=		gputils
 DISTFILES=		${DISTNAME}${EXTRACT_SUFX} gputils-testsuite-${VERSION}${EXTRACT_SUFX}:0
Index: distinfo
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/distinfo,v
retrieving revision 1.2
diff -u -w -r1.2 distinfo
--- distinfo	14 Jan 2004 22:19:29 -0000	1.2
+++ distinfo	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
-MD5 (gputils/gputils-0.11.8.tar.gz) = 06b70d81d9fdf5ddcd96791acf93eac6
-MD5 (gputils/gputils-testsuite-0.11.8.tar.gz) = 56794dfa94c995f11487a83d2de0378c
-RMD160 (gputils/gputils-0.11.8.tar.gz) = e4bf74b00127408ef299dc10a8315a144397d05f
-RMD160 (gputils/gputils-testsuite-0.11.8.tar.gz) = acf6abd6691a920eadd3a641d1c73fd563c2e5d8
-SHA1 (gputils/gputils-0.11.8.tar.gz) = 164a520b64ed3319c8b2392d8179be71dbe822e5
-SHA1 (gputils/gputils-testsuite-0.11.8.tar.gz) = ff8dc51c6822f61d90bac66d6f74a86534940d80
+MD5 (gputils/gputils-0.12.0.tar.gz) = d3a563f250857f75b97fbd2110e68adb
+MD5 (gputils/gputils-testsuite-0.12.0.tar.gz) = 87e5ded0935ad1b50c2b8ed58635e353
+RMD160 (gputils/gputils-0.12.0.tar.gz) = 745a02697d3dc977715a8832747d19b35b2f5d78
+RMD160 (gputils/gputils-testsuite-0.12.0.tar.gz) = 1779c5598a313bdd1b9475b6732cc7f69837e085
+SHA1 (gputils/gputils-0.12.0.tar.gz) = 5aa21423c5619fa0aac20eac5ceb9c4f34cba1e0
+SHA1 (gputils/gputils-testsuite-0.12.0.tar.gz) = 954ebce00611254cf200446886f253ab09e562cb
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-configure_ac,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-configure_ac
--- patches/patch-configure_ac	3 Nov 2003 01:02:34 -0000	1.1.1.1
+++ patches/patch-configure_ac	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-configure_ac,v 1.1.1.1 2003/11/03 01:02:34 naddy Exp $
---- configure.ac.orig	2003-10-14 20:21:51.000000000 +1000
-+++ configure.ac	2003-10-14 20:22:10.000000000 +1000
-@@ -51,7 +51,7 @@ AC_CHECK_TOOL(AR, ar, :)
+--- configure.ac.orig	2004-01-21 17:17:51.000000000 +1100
++++ configure.ac	2004-01-25 20:36:30.000000000 +1100
+@@ -56,7 +56,7 @@ AC_CHECK_TOOL(AR, ar, :)
  
  # Checks for header files.
  AC_HEADER_STDC
Index: patches/patch-gpal_analyze_c
===================================================================
RCS file: patches/patch-gpal_analyze_c
diff -N patches/patch-gpal_analyze_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gpal_analyze_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- gpal/analyze.c.orig	2004-01-26 10:48:21.000000000 +1100
++++ gpal/analyze.c	2004-01-26 10:48:48.000000000 +1100
+@@ -53,7 +53,7 @@ analyze_error(tree *node, const char *fo
+     return;
+ 
+   va_start(args, format);
+-  vsprintf(buffer, format, args);
++  vsnprintf(buffer, sizeof(buffer), format, args);
+   va_end(args);
+ 
+   if ((node) && (node->file_id)) {
+@@ -80,7 +80,7 @@ analyze_warning(tree *node, const char *
+     return;
+ 
+   va_start(args, format);
+-  vsprintf(buffer, format, args);
++  vsnprintf(buffer, sizeof(buffer), format, args);
+   va_end(args);
+ 
+   if ((node) && (node->file_id)) {
Index: patches/patch-gpal_codegen14_c
===================================================================
RCS file: patches/patch-gpal_codegen14_c
diff -N patches/patch-gpal_codegen14_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gpal_codegen14_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+--- gpal/codegen14.c.orig	2004-01-26 10:43:13.000000000 +1100
++++ gpal/codegen14.c	2004-01-26 10:43:55.000000000 +1100
+@@ -80,9 +80,9 @@ load_file14(char *name, enum size_tag si
+   if (offset == 0) {
+     offset_buffer[0] = '\0';
+   } else if (offset < 0) {
+-    sprintf(offset_buffer, " - %#x", -offset);
++    snprintf(offset_buffer, sizeof(offset_buffer), " - %#x", -offset);
+   } else {
+-    sprintf(offset_buffer, " + %#x", offset);
++    snprintf(offset_buffer, sizeof(offset_buffer), " + %#x", offset);
+   }
+   
+   /* W is used as the working register for single byte types. */
+@@ -134,9 +134,9 @@ store_file14(char *name, enum size_tag s
+   if (offset == 0) {
+     offset_buffer[0] = '\0';
+   } else if (offset < 0) {
+-    sprintf(offset_buffer, " - %#x", -offset);
++    snprintf(offset_buffer, sizeof(offset_buffer), " - %#x", -offset);
+   } else {
+-    sprintf(offset_buffer, " + %#x", offset);
++    snprintf(offset_buffer, sizeof(offset_buffer), " + %#x", offset);
+   }
+   
+   if ((size == size_int8) || (size == size_uint8)) {
Index: patches/patch-gpal_codegen_c
===================================================================
RCS file: patches/patch-gpal_codegen_c
diff -N patches/patch-gpal_codegen_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gpal_codegen_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,59 @@
+$OpenBSD$
+--- gpal/codegen.c.orig	2004-01-07 17:35:53.000000000 +1100
++++ gpal/codegen.c	2004-01-26 10:49:18.000000000 +1100
+@@ -74,7 +74,7 @@ codegen_write_asm(const char *format, ..
+   char buffer[BUFSIZ]; 
+ 
+   va_start(args, format);
+-  vsprintf(buffer, format, args);
++  vsnprintf(buffer, sizeof(buffer), format, args);
+   va_end(args);
+ 
+   fprintf(state.output.f, "  %s\n", buffer);
+@@ -89,7 +89,7 @@ codegen_write_comment(const char *format
+   char buffer[BUFSIZ]; 
+ 
+   va_start(args, format);
+-  vsprintf(buffer, format, args);
++  vsnprintf(buffer, sizeof(buffer), format, args);
+   va_end(args);
+    
+   fprintf(state.output.f, "; %s\n", buffer);
+@@ -107,7 +107,7 @@ char *
+ codegen_next_label(void)
+ {
+   char label[BUFSIZ];
+-  sprintf(label, "_%i", label_number++);
++  snprintf(label, sizeof(label), "_%i", label_number++);
+   return strdup(label);
+ }
+ 
+@@ -517,7 +517,7 @@ codegen_get_temp(enum size_tag size)
+ {
+   char temp_name[BUFSIZ];
+  
+-  sprintf(temp_name, "_%s_temp_%d", FILE_NAME(state.module), temp_number);
++  snprintf(temp_name, sizeof(temp_name), "_%s_temp_%d", FILE_NAME(state.module), temp_number);
+ 
+   temp_number += prim_size(size);
+ 
+@@ -534,8 +534,8 @@ codegen_init_asm()
+   char buffer[BUFSIZ];
+ 
+   /* open output filename */
+-  strcpy(state.asmfilename, state.basefilename);
+-  strcat(state.asmfilename, ".asm");
++  strlcpy(state.asmfilename, state.basefilename, sizeof(state.asmfilename));
++  strlcat(state.asmfilename, ".asm", sizeof(state.asmfilename));
+   state.output.f = fopen(state.asmfilename, "w");
+   if (state.output.f == NULL) {
+     perror(state.asmfilename);
+@@ -548,7 +548,7 @@ codegen_init_asm()
+   codegen_size = size_uint8;
+   codegen_bytes = prim_size(codegen_size);
+ 
+-  gp_date_string(buffer);
++  gp_date_string(buffer, sizeof(buffer));
+ 
+   fprintf(state.output.f, "; %s\n", state.asmfilename);
+   fprintf(state.output.f, "; generated by %s on %s\n\n",
Index: patches/patch-gpal_gpal_c
===================================================================
RCS file: patches/patch-gpal_gpal_c
diff -N patches/patch-gpal_gpal_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gpal_gpal_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,102 @@
+$OpenBSD$
+--- gpal/gpal.c.orig	2004-01-26 10:36:51.000000000 +1100
++++ gpal/gpal.c	2004-01-26 10:40:38.000000000 +1100
+@@ -68,9 +68,9 @@ add_file(char *name,
+ 
+   if (extension != NULL) {
+     file_name = malloc(strlen(name) + strlen(extension)+ 2);
+-    strcpy(file_name, name);
+-    strcat(file_name, ".");
+-    strcat(file_name, extension);
++    strlcpy(file_name, name, sizeof(file_name));
++    strlcat(file_name, ".", sizeof(file_name));
++    strlcat(file_name, extension, sizeof(file_name));
+   } else {
+     file_name = strdup(name);
+   }
+@@ -389,18 +389,18 @@ assemble(gp_boolean debug_info)
+     exit(1);
+   }
+ 
+-  strcpy(command, "gpasm -c ");
++  strlcpy(command, "gpasm -c ", sizeof(command));
+ 
+   if (debug_info) {
+-    strcat(command, "-g ");
++    strlcat(command, "-g ", sizeof(command));
+   }
+ 
+   if (gp_quiet) {
+-    strcat(command, "-q ");
++    strlcat(command, "-q ", sizeof(command));
+   }
+ 
+-  strcat(command, state.basefilename);
+-  strcat(command, ".asm ");
++  strlcat(command, state.basefilename, sizeof(command));
++  strlcat(command, ".asm ", sizeof(command));
+ 
+   if (!gp_debug_disable) {
+     printf("%s\n", command);
+@@ -438,38 +438,38 @@ combine_output(void)
+     return;
+ 
+   if (state.archive == true) {
+-    strcpy(command, "gplib -c ");
++    strlcpy(command, "gplib -c ", sizeof(command));
+   } else {
+-    strcpy(command, "gplink ");
++    strlcpy(command, "gplink ", sizeof(command));
+   }
+   
+   if (gp_quiet) {
+-    strcat(command, "-q ");
++    strlcat(command, "-q ", sizeof(command));
+   }
+ 
+   if (state.options) {
+-    strcat(command, state.options);
+-    strcat(command, " ");
++    strlcat(command, state.options, sizeof(command));
++    strlcat(command, " ", sizeof(command));
+   }
+ 
+   if (state.outfilename == NULL) {
+     if (state.archive == true) {
+       gp_message("using \"library.a\" for archive name");
+-      strcat(command, "library.a ");
++      strlcat(command, "library.a ", sizeof(command));
+     }
+   } else {
+     if (state.archive == false) {
+-      strcat(command, "-o ");    
++      strlcat(command, "-o ", sizeof(command));
+     }
+-    strcat(command, state.outfilename);
+-    strcat(command, " ");
++    strlcat(command, state.outfilename, sizeof(command));
++    strlcat(command, " ", sizeof(command));
+   }
+ 
+   list = state.path;
+   while(list) {
+-    strcat(command, "-I ");    
+-    strcat(command, gp_list_get(list)); 
+-    strcat(command, " ");
++    strlcat(command, "-I ", sizeof(command));
++    strlcat(command, gp_list_get(list), sizeof(command));
++    strlcat(command, " ", sizeof(command));
+     list = list->next;
+   }  
+   
+@@ -477,8 +477,8 @@ combine_output(void)
+   while(list) {
+     file_data = gp_list_get(list);
+     if (file_data->is_link) {
+-      strcat(command, file_data->name); 
+-      strcat(command, " ");
++      strlcat(command, file_data->name, sizeof(command));
++      strlcat(command, " ", sizeof(command));
+     }
+     list = list->next;
+   }
Index: patches/patch-gpal_scan_c
===================================================================
RCS file: patches/patch-gpal_scan_c
diff -N patches/patch-gpal_scan_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gpal_scan_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,36 @@
+$OpenBSD$
+--- gpal/scan.c.orig	2004-01-26 10:40:47.000000000 +1100
++++ gpal/scan.c	2004-01-26 10:44:21.000000000 +1100
+@@ -1919,9 +1919,9 @@ search_pathes(struct source_context *new
+   gp_linked_list *path = state.path;
+ 
+   while (path) {
+-    strcpy(tryname, gp_list_get(path));
+-    strcat(tryname, COPY_CHAR);
+-    strcat(tryname, name);
++    strlcpy(tryname, gp_list_get(path), sizeof(tryname));
++    strlcat(tryname, COPY_CHAR, sizeof(tryname));
++    strlcat(tryname, name, sizeof(tryname));
+     new->f = fopen(tryname, "rt");
+     if(new->f) {
+       new->name = strdup(tryname);
+@@ -1945,8 +1945,8 @@ void open_src(char *name, enum source_ty
+     length = strlen(name);
+     length += strlen(".pub") + 1;
+     file_name = malloc(length);
+-    strcpy(file_name, name);
+-    strcat(file_name, ".pub");
++    strlcpy(file_name, name, length);
++    strlcat(file_name, ".pub", length);
+   } else {
+     file_name = strdup(name);
+   }
+@@ -2035,7 +2035,7 @@ stringtolong(char *string, int radix)
+   if ((endptr == NULL) || (*endptr != '\0')) {
+     char complaint[80];
+ 
+-    sprintf(complaint,
++    snprintf(complaint, sizeof(complaint),
+             isprint(*endptr) ?
+             "Illegal character '%c' in numeric constant " :
+             "Illegal character %#x in numeric constant" ,
Index: patches/patch-gpal_symbol_c
===================================================================
RCS file: patches/patch-gpal_symbol_c
diff -N patches/patch-gpal_symbol_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gpal_symbol_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- gpal/symbol.c.orig	2004-01-26 10:44:31.000000000 +1100
++++ gpal/symbol.c	2004-01-26 10:44:52.000000000 +1100
+@@ -60,7 +60,7 @@ mangle_name2(char *first, char *second)
+ {
+   char buffer[BUFSIZ];
+ 
+-  sprintf(buffer, "%s.%s", first, second);
++  snprintf(buffer, sizeof(buffer), "%s.%s", first, second);
+ 
+   return gp_lower_case(buffer);
+ }
+@@ -70,7 +70,7 @@ mangle_name3(char *first, char *second, 
+ {
+   char buffer[BUFSIZ];
+ 
+-  sprintf(buffer, "%s.%s.%s", first, second, third);
++  snprintf(buffer, sizeof(buffer), "%s.%s.%s", first, second, third);
+ 
+   return gp_lower_case(buffer);
+ }
Index: patches/patch-gpasm_coff_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_coff_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_coff_c
--- patches/patch-gpasm_coff_c	3 Nov 2003 01:02:34 -0000	1.1.1.1
+++ patches/patch-gpasm_coff_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-gpasm_coff_c,v 1.1.1.1 2003/11/03 01:02:34 naddy Exp $
---- gpasm/coff.c.orig	2003-10-03 15:59:39.000000000 +1000
-+++ gpasm/coff.c	2003-10-19 01:24:54.000000000 +1000
+--- gpasm/coff.c.orig	2004-01-21 17:17:52.000000000 +1100
++++ gpasm/coff.c	2004-01-25 20:36:30.000000000 +1100
 @@ -32,8 +32,8 @@ void 
  coff_init(void)
  {
@@ -12,7 +12,7 @@
    }
  
    if (state.objfile == suppress) {
-@@ -399,7 +399,7 @@ coff_add_sym(char *name, int value, int 
+@@ -403,7 +403,7 @@ coff_add_sym(char *name, int value, int 
  
    new = gp_coffgen_findsymbol(state.obj.object, name);
    if (new != NULL) {
@@ -21,7 +21,7 @@
              "Duplicate label or redefining symbol that cannot be redefined. (%s)",
              name);    
      gperror(GPE_DUPLAB, message);
-@@ -537,14 +537,14 @@ coff_local_name(char *name)
+@@ -547,14 +547,14 @@ coff_local_name(char *name)
    if (local == NULL) {
      /* It isn't in the stGlobal so it must be in stTop. It's local. */
      while(1) {
Index: patches/patch-gpasm_directive_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_directive_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_directive_c
--- patches/patch-gpasm_directive_c	3 Nov 2003 01:02:34 -0000	1.1.1.1
+++ patches/patch-gpasm_directive_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-gpasm_directive_c,v 1.1.1.1 2003/11/03 01:02:34 naddy Exp $
---- gpasm/directive.c.orig	2003-10-03 15:44:16.000000000 +1000
-+++ gpasm/directive.c	2003-10-19 01:24:54.000000000 +1000
+--- gpasm/directive.c.orig	2004-01-07 17:35:53.000000000 +1100
++++ gpasm/directive.c	2004-01-25 20:40:03.000000000 +1100
 @@ -323,7 +323,7 @@ static int list_symbol_member(struct pno
      return 0;
    } else if (STRCMP(M->value.symbol, HEAD(L)->value.symbol) == 0) {
@@ -27,7 +27,7 @@
        state.obj.new_sec_addr = maybe_evaluate(p) >> _16bit_core;
        state.obj.new_sec_flags = STYP_TEXT | STYP_ABS;
        break;
-@@ -1171,12 +1171,12 @@ static gpasmVal do_global(gpasmVal r,
+@@ -1109,12 +1109,12 @@ static gpasmVal do_global(gpasmVal r,
        if (p->tag == symbol) {
          s = get_symbol(state.stTop, p->value.symbol);
          if (s == NULL) {
@@ -42,7 +42,7 @@
              gpwarning(GPW_UNKNOWN, buf);    
            } else {
              if ((var->previous_type == gvt_address) || 
-@@ -1187,7 +1187,7 @@ static gpasmVal do_global(gpasmVal r,
+@@ -1125,7 +1125,7 @@ static gpasmVal do_global(gpasmVal r,
              } else if (var->previous_type == gvt_extern) { 
                gperror(GPE_DUPLAB, NULL);    
              } else {
@@ -51,7 +51,7 @@
                        p->value.symbol);
                gperror(GPE_MUST_BE_LABEL, buf);    
              } 
-@@ -1218,14 +1218,14 @@ static gpasmVal do_idata(gpasmVal r,
+@@ -1156,14 +1156,14 @@ static gpasmVal do_idata(gpasmVal r,
      switch (arity) {
      case 0:
        /* new relocatable section */
@@ -68,7 +68,7 @@
        state.obj.new_sec_addr = maybe_evaluate(p) >> _16bit_core;
        state.obj.new_sec_flags = STYP_DATA | STYP_ABS;
        break;
-@@ -1677,7 +1677,7 @@ static gpasmVal do_org(gpasmVal r,
+@@ -1615,7 +1615,7 @@ static gpasmVal do_org(gpasmVal r,
        }	else {
          /* Default section name, this will be overwritten if a label is 
             present. */
@@ -77,7 +77,7 @@
          state.obj.new_sec_addr = r;
          state.obj.new_sec_flags = STYP_TEXT | STYP_ABS;
          state.lst.line.linetype = sec;
-@@ -1900,14 +1900,14 @@ static gpasmVal do_udata(gpasmVal r,
+@@ -1838,14 +1838,14 @@ static gpasmVal do_udata(gpasmVal r,
      switch (arity) {
      case 0:
        /* new relocatable section */
@@ -91,10 +91,10 @@
        p = HEAD(parms);
 -      strcpy(state.obj.new_sec_name, ".udata");
 +      strlcpy(state.obj.new_sec_name, ".udata", sizeof(state.obj.new_sec_name));
-       state.obj.new_sec_addr = maybe_evaluate(p) >> _16bit_core;
+       state.obj.new_sec_addr = maybe_evaluate(p);
        state.obj.new_sec_flags = STYP_BSS | STYP_ABS;
        break;
-@@ -1935,14 +1935,14 @@ static gpasmVal do_udata_acs(gpasmVal r,
+@@ -1873,14 +1873,14 @@ static gpasmVal do_udata_acs(gpasmVal r,
      switch (arity) {
      case 0:
        /* new relocatable section */
@@ -108,10 +108,10 @@
        p = HEAD(parms);
 -      strcpy(state.obj.new_sec_name, ".udata_acs");
 +      strlcpy(state.obj.new_sec_name, ".udata_acs", sizeof(state.obj.new_sec_name));
-       state.obj.new_sec_addr = maybe_evaluate(p) >> _16bit_core;
+       state.obj.new_sec_addr = maybe_evaluate(p);
        state.obj.new_sec_flags = STYP_BSS | STYP_ABS | STYP_ACCESS;
        break;
-@@ -1970,14 +1970,14 @@ static gpasmVal do_udata_ovr(gpasmVal r,
+@@ -1908,14 +1908,14 @@ static gpasmVal do_udata_ovr(gpasmVal r,
      switch (arity) {
      case 0:
        /* new relocatable section */
@@ -125,10 +125,10 @@
        p = HEAD(parms);
 -      strcpy(state.obj.new_sec_name, ".udata_ovr");
 +      strlcpy(state.obj.new_sec_name, ".udata_ovr", sizeof(state.obj.new_sec_name));
-       state.obj.new_sec_addr = maybe_evaluate(p) >> _16bit_core;
+       state.obj.new_sec_addr = maybe_evaluate(p);
        state.obj.new_sec_flags = STYP_BSS | STYP_ABS | STYP_OVERLAY;
        break;
-@@ -2005,14 +2005,14 @@ static gpasmVal do_udata_shr(gpasmVal r,
+@@ -1943,14 +1943,14 @@ static gpasmVal do_udata_shr(gpasmVal r,
      switch (arity) {
      case 0:
        /* new relocatable section */
@@ -142,10 +142,10 @@
        p = HEAD(parms);
 -      strcpy(state.obj.new_sec_name, ".udata_shr");
 +      strlcpy(state.obj.new_sec_name, ".udata_shr", sizeof(state.obj.new_sec_name));
-       state.obj.new_sec_addr = maybe_evaluate(p) >> _16bit_core;
+       state.obj.new_sec_addr = maybe_evaluate(p);
        state.obj.new_sec_flags = STYP_BSS | STYP_ABS | STYP_SHARED;
        break;
-@@ -2190,7 +2190,7 @@ static void emit_check_relative(int insn
+@@ -2128,7 +2128,7 @@ static void emit_check_relative(int insn
  
    /* If the branch is too far then issue an error */
    if ((argument > range) || (argument < -(range+1))) {
@@ -154,7 +154,7 @@
  	    argument,
  	    -(range+1),
  	    range);
-@@ -2950,7 +2950,7 @@ gpasmVal do_insn(char *name, struct pnod
+@@ -2888,7 +2888,7 @@ gpasmVal do_insn(char *name, struct pnod
            gperror(GPE_UNDEF_PROC, NULL);
          } else {
            char mesg[80];
Index: patches/patch-gpasm_gpasm_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_gpasm_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_gpasm_c
--- patches/patch-gpasm_gpasm_c	3 Nov 2003 01:02:35 -0000	1.1.1.1
+++ patches/patch-gpasm_gpasm_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-gpasm_gpasm_c,v 1.1.1.1 2003/11/03 01:02:35 naddy Exp $
---- gpasm/gpasm.c.orig	2003-10-09 11:29:47.000000000 +1000
-+++ gpasm/gpasm.c	2003-10-19 01:24:54.000000000 +1000
-@@ -255,8 +255,8 @@ process_args( int argc, char *argv[])
+--- gpasm/gpasm.c.orig	2004-01-09 19:10:36.000000000 +1100
++++ gpasm/gpasm.c	2004-01-25 20:36:30.000000000 +1100
+@@ -266,8 +266,8 @@ process_args( int argc, char *argv[])
        #endif
        break;
      case 'o':
@@ -12,7 +12,7 @@
        pc = strrchr(state.basefilename, '.');
        if (pc)
          *pc = 0;
-@@ -317,7 +317,7 @@ assemble(void)
+@@ -324,7 +324,7 @@ assemble(void)
    state.c_memory = state.i_memory = i_memory_create();
  
    if(state.basefilename[0] == '\0') {
Index: patches/patch-gpasm_lst_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_lst_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_lst_c
--- patches/patch-gpasm_lst_c	3 Nov 2003 01:02:35 -0000	1.1.1.1
+++ patches/patch-gpasm_lst_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-gpasm_lst_c,v 1.1.1.1 2003/11/03 01:02:35 naddy Exp $
---- gpasm/lst.c.orig	2003-07-08 11:40:43.000000000 +1000
-+++ gpasm/lst.c	2003-10-15 00:26:10.000000000 +1000
+--- gpasm/lst.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ gpasm/lst.c	2004-01-25 20:42:51.000000000 +1100
 @@ -76,7 +76,7 @@ void lst_init()
    state.lst.symboltable = 1;
  
@@ -26,28 +26,38 @@
  {
    char buf[BUFSIZ];
 -  char *e;
-   int i, j, base, row_used;
+   int i, j, base, row_used, num_per_line, num_per_block;
  
    lst_line("");
-@@ -139,21 +138,18 @@ void lst_memory_map(MemBlock *m)
- 	  row_used = 1;
+@@ -151,29 +150,26 @@ void lst_memory_map(MemBlock *m)
+       }
  
        if(row_used) {
 -        e = buf;
--        sprintf(e, "%04x :", (i + base));
+-        sprintf(e, "%08x :", (i + base) << _16bit_core);
 -	e += strlen(e);
-+       snprintf(buf, sizeof(buf), "%04x :", (i + base));
- 	for(j = 0; j<64; j++) {
-           if ((j%16) == 0) {
++        snprintf(buf, sizeof(buf), "%08x :", (i + base) << _16bit_core);
+ 	for (j = 0; j < num_per_line; j++) {
+           if ((j % num_per_block) == 0) {
 -	    *e++ = ' ';
 +	    strlcat(buf, " ", sizeof(buf));
            }
-           if ((i_memory_get(m, i+j) & MEM_USED_MASK)) {
+           if (m->memory[i + j] & MEM_USED_MASK) {
 -	    *e++ = 'X';
 +	    strlcat(buf, "X", sizeof(buf));
+ 	    if (_16bit_core) {
+ 	      /* each word has two bytes */
+-	      *e++ = 'X';            
++	      strlcat(buf, "X", sizeof(buf));
+ 	    }
            } else {
 -	    *e++ = '-';
 +	    strlcat(buf, "-", sizeof(buf));
+ 	    if (_16bit_core) {
+ 	      /* each word has two bytes */
+-	      *e++ = '-';            
++	      strlcat(buf, "-", sizeof(buf));
+ 	    }
            }
          }
  
@@ -55,7 +65,7 @@
          lst_line(buf);
        }
      }
-@@ -165,7 +161,7 @@ void lst_memory_map(MemBlock *m)
+@@ -185,7 +181,7 @@ void lst_memory_map(MemBlock *m)
    lst_line("All other memory blocks unused.");
    lst_line("");
  
@@ -64,7 +74,7 @@
    lst_line(buf);
  
  }
-@@ -195,51 +191,44 @@ void lst_close()
+@@ -215,51 +211,44 @@ void lst_close()
  void lst_format_line(char *src_line, int value)
  {
    char m[BUFSIZ];
@@ -133,7 +143,7 @@
      break;
    case config:
      if(_16bit_core) {
-@@ -247,33 +236,28 @@ void lst_format_line(char *src_line, int
+@@ -267,33 +256,28 @@ void lst_format_line(char *src_line, int
  	 words in the list file. */
        if (state.lst.config_address == CONFIG4L) {
          /* Special case */
@@ -172,7 +182,7 @@
      if (SECTION_FLAGS & STYP_TEXT) {
        /* generate line numbers for res directives in program memory */
        emitted = state.org - state.lst.line.was_org;
-@@ -283,22 +267,22 @@ void lst_format_line(char *src_line, int
+@@ -303,22 +287,22 @@ void lst_format_line(char *src_line, int
    case dir:
    case none:
    default:
@@ -200,7 +210,7 @@
          
      old = src_line;
  
-@@ -335,7 +319,7 @@ void lst_format_line(char *src_line, int
+@@ -355,7 +339,7 @@ void lst_format_line(char *src_line, int
  #endif
  
    if (state.lst.line.linetype == idlocs) {
@@ -209,7 +219,7 @@
              i_memory_get(state.i_memory, 
  		         state.device.id_location + 2) & 0xffff,
              i_memory_get(state.i_memory, 
-@@ -348,14 +332,14 @@ void lst_format_line(char *src_line, int
+@@ -368,14 +352,14 @@ void lst_format_line(char *src_line, int
  
      for (i = 2; i < emitted; i += 2) {
        if ((i + 1) < emitted)
@@ -226,7 +236,7 @@
  		((state.lst.line.was_org + i) << _16bit_core),
  		i_memory_get(state.i_memory, 
  			     state.lst.line.was_org + i) & 0xffff);
-@@ -376,7 +360,7 @@ void lst_symbol_table(struct symbol_tabl
+@@ -396,7 +380,7 @@ void lst_symbol_table(struct symbol_tabl
    char buf[BUFSIZ];
  
    lst_line("SYMBOL TABLE");
@@ -235,7 +245,7 @@
    lst_line(buf);
    lst_line("");
  
-@@ -394,7 +378,7 @@ void lst_symbol_table(struct symbol_tabl
+@@ -414,7 +398,7 @@ void lst_symbol_table(struct symbol_tabl
      struct variable *var;
  
      var = get_symbol_annotation(lst[i]);
@@ -244,7 +254,7 @@
              symbol_format, 
              get_symbol_name(lst[i]),
              var ? var->value : 0);
-@@ -424,7 +408,7 @@ void lst_defines_table(struct symbol_tab
+@@ -444,7 +428,7 @@ void lst_defines_table(struct symbol_tab
      char *defined_as;
  
      defined_as = get_symbol_annotation(lst[i]);
Index: patches/patch-gpasm_macro_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_macro_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_macro_c
--- patches/patch-gpasm_macro_c	3 Nov 2003 01:02:35 -0000	1.1.1.1
+++ patches/patch-gpasm_macro_c	26 Jan 2004 00:01:18 -0000
@@ -1,26 +1,19 @@
 $OpenBSD: patch-gpasm_macro_c,v 1.1.1.1 2003/11/03 01:02:35 naddy Exp $
---- gpasm/macro.c.orig	2003-10-14 21:24:34.000000000 +1000
-+++ gpasm/macro.c	2003-10-14 21:27:13.000000000 +1000
-@@ -59,15 +59,15 @@ void setup_macro(struct macro_head *h, i
-         if (pToH->tag == symbol) {
-           annotate_symbol(sym, strdup(pToH->value.symbol));
-         } else if (pToH->tag == string) {
--          sprintf(buffer, "\"%s\"", pToH->value.string);
-+          snprintf(buffer, sizeof(buffer), "\"%s\"", pToH->value.string);
-           annotate_symbol(sym, strdup(buffer));
+--- gpasm/macro.c.orig	2004-01-21 17:17:52.000000000 +1100
++++ gpasm/macro.c	2004-01-25 20:43:22.000000000 +1100
+@@ -150,9 +150,9 @@ node_to_string(struct pnode *p)
+   switch(p->tag) {
+   case constant:
+     if (p->value.constant < 0) {
+-      sprintf(constant_buffer, "-%#x", -p->value.constant);
++      snprintf(constant_buffer, sizeof(constant_buffer), "-%#x", -p->value.constant);
          } else {
-           int value = maybe_evaluate(pToH);
- 
- 	  if (value < 0)
--	    sprintf(buffer, "-%#x", -value);
-+	    snprintf(buffer, sizeof(buffer), "-%#x", -value);
-           else
--	    sprintf(buffer, "%#x", value);	  
-+	    snprintf(buffer, sizeof(buffer), "%#x", value);	  
- 	  annotate_symbol(sym, strdup(buffer));
+-      sprintf(constant_buffer, "%#x", p->value.constant);
++      snprintf(constant_buffer, sizeof(constant_buffer), "%#x", p->value.constant);
          }
-     
-@@ -83,12 +83,12 @@ void setup_macro(struct macro_head *h, i
+     cat_string(constant_buffer);
+     break;
+@@ -230,12 +230,12 @@ void setup_macro(struct macro_head *h, i
  
  /* Copy the macro body to a buffer. */
  
@@ -36,7 +29,7 @@
      }
      b = b->next;
    }
-@@ -118,10 +118,10 @@ make_macro_buffer(struct macro_head *h)
+@@ -265,10 +265,10 @@ make_macro_buffer(struct macro_head *h)
  
    /* Allocate memory for the new buffer. yy_delete_buffer frees it */
    macro_src = (char *)calloc(sizeof(char), macro_src_size);
Index: patches/patch-gpasm_parse_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_parse_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_parse_c
--- patches/patch-gpasm_parse_c	3 Nov 2003 01:02:35 -0000	1.1.1.1
+++ patches/patch-gpasm_parse_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-gpasm_parse_c,v 1.1.1.1 2003/11/03 01:02:35 naddy Exp $
---- gpasm/parse.c.orig	2003-05-06 05:14:46.000000000 +1000
-+++ gpasm/parse.c	2003-10-14 23:17:54.000000000 +1000
-@@ -1369,7 +1369,7 @@ case 9:
+--- gpasm/parse.c.orig	2004-01-09 19:10:36.000000000 +1100
++++ gpasm/parse.c	2004-01-25 20:36:30.000000000 +1100
+@@ -1402,7 +1402,7 @@ case 11:
  	      /* Outside a macro, just define the label. */
  	      switch (state.lst.line.linetype) {
  	      case sec:
Index: patches/patch-gpasm_scan_l
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gpasm_scan_l,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gpasm_scan_l
--- patches/patch-gpasm_scan_l	3 Nov 2003 01:02:35 -0000	1.1.1.1
+++ patches/patch-gpasm_scan_l	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-gpasm_scan_l,v 1.1.1.1 2003/11/03 01:02:35 naddy Exp $
---- gpasm/scan.l.orig	2003-10-19 01:28:50.000000000 +1000
-+++ gpasm/scan.l	2003-10-19 01:31:11.000000000 +1000
-@@ -83,8 +83,7 @@ end		         {
+--- gpasm/scan.l.orig	2004-01-21 17:17:52.000000000 +1100
++++ gpasm/scan.l	2004-01-25 20:36:31.000000000 +1100
+@@ -86,8 +86,7 @@ end		         {
  <title>[^<"\r\n]*[>"]?   { /* got the title text */
  #define LEN sizeof(state.lst.title_name)
                             yytext[yyleng - 1] = '\0';
@@ -11,7 +11,7 @@
                             BEGIN(INITIAL);
  #undef LEN
                           }
-@@ -94,8 +93,7 @@ end		         {
+@@ -97,8 +96,7 @@ end		         {
  <subtitle>[^<"\r\n]*[>"]?   { /* got the subtitle text */
  #define LEN sizeof(state.lst.subtitle_name)
                             yytext[yyleng - 1] = '\0';
@@ -21,16 +21,7 @@
                             BEGIN(INITIAL);
  #undef LEN
                           }
-@@ -297,7 +295,7 @@ list		     	 {
-                                   that way it won't be a label */
-                                buffer[0] = ' ';
-                                buffer[1] = '\0';
--                               strcat(buffer, subst);
-+                               strlcat(buffer, subst, sizeof(buffer));
-                                push_string(buffer);
-  			     }
- 			   } else {
-@@ -459,9 +457,9 @@ search_pathes(struct source_context *new
+@@ -468,9 +466,9 @@ search_pathes(struct source_context *new
    int i;
  
    for(i = 0; i < state.path_num; i++) {
@@ -43,7 +34,7 @@
      new->f = fopen(tryname, "rt");
      if(new->f) {
        new->name = strdup(tryname);
-@@ -507,7 +505,7 @@ void open_src(char *name, int isinclude)
+@@ -516,7 +514,7 @@ void open_src(char *name, int isinclude)
      if (state.src) {
        char complaint[BUFSIZ];
  
Index: patches/patch-gplink_cod_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gplink_cod_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gplink_cod_c
--- patches/patch-gplink_cod_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-gplink_cod_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-gplink_cod_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- gplink/cod.c.orig	2003-10-14 21:43:06.000000000 +1000
-+++ gplink/cod.c	2003-10-14 21:43:39.000000000 +1000
-@@ -78,8 +78,8 @@ cod_init(void)
+--- gplink/cod.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ gplink/cod.c	2004-01-25 20:36:31.000000000 +1100
+@@ -117,8 +117,8 @@ cod_init(void)
  {
  
    if (state.codfile != named) {
Index: patches/patch-gplink_gplink_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gplink_gplink_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gplink_gplink_c
--- patches/patch-gplink_gplink_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-gplink_gplink_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-gplink_gplink_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- gplink/gplink.c.orig	2003-10-14 21:43:55.000000000 +1000
-+++ gplink/gplink.c	2003-10-14 21:50:19.000000000 +1000
-@@ -264,7 +264,7 @@ void gplink_open_coff(char *name)
+--- gplink/gplink.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ gplink/gplink.c	2004-01-25 20:51:41.000000000 +1100
+@@ -265,7 +265,7 @@ void gplink_open_coff(char *name)
    FILE *coff;
    char file_name[BUFSIZ];
    
@@ -10,7 +10,7 @@
    
    coff = fopen(file_name, "rb");
    if ((coff == NULL) && (strchr(file_name, PATH_CHAR) == 0)) { 
-@@ -272,9 +272,9 @@ void gplink_open_coff(char *name)
+@@ -273,9 +273,9 @@ void gplink_open_coff(char *name)
      int i;
  
      for(i = 0; i < state.numpaths; i++) {
@@ -23,7 +23,16 @@
        coff = fopen(file_name, "rb");
        if (coff != NULL) {
          break;
-@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
+@@ -387,7 +387,7 @@ int main(int argc, char *argv[])
+   gp_init();
+ 
+   /* initialize */
+-  gp_date_string(state.startdate);
++  gp_date_string(state.startdate, sizeof(state.startdate));
+   state.hex_format = inhx32;
+   state.numpaths = 0;
+   state.byte_addr = 0;
+@@ -457,7 +457,7 @@ int main(int argc, char *argv[])
        state.mapfile = normal;
        break;
      case 'o':
@@ -32,7 +41,7 @@
        pc = strrchr(state.basefilename, '.');
        if (pc)
          *pc = 0;
-@@ -478,18 +478,18 @@ int main(int argc, char *argv[])
+@@ -489,7 +489,7 @@ int main(int argc, char *argv[])
  
    if(state.basefilename[0] == '\0') {
      /* set default output filename to be a.o, a.hex, a.cod, a.map */
@@ -40,17 +49,17 @@
 +    strlcpy(state.basefilename, "a", sizeof(state.basefilename));
    }
  
+   /* Add the library path to the include paths list last, so that the user
+@@ -499,12 +499,12 @@ int main(int argc, char *argv[])
+   }
+ 
    /* setup output filenames */
--  strcpy(state.codfilename, state.basefilename);
--  strcat(state.codfilename, ".cod");  
 -  strcpy(state.hexfilename, state.basefilename);
 -  strcat(state.hexfilename, ".hex");  
 -  strcpy(state.mapfilename, state.basefilename);
 -  strcat(state.mapfilename, ".map");  
 -  strcpy(state.objfilename, state.basefilename);
 -  strcat(state.objfilename, ".cof");  
-+  strlcpy(state.codfilename, state.basefilename, sizeof(state.codfilename));
-+  strlcat(state.codfilename, ".cod", sizeof(state.codfilename));  
 +  strlcpy(state.hexfilename, state.basefilename, sizeof(state.hexfilename));
 +  strlcat(state.hexfilename, ".hex", sizeof(state.hexfilename));  
 +  strlcpy(state.mapfilename, state.basefilename, sizeof(state.mapfilename));
@@ -60,18 +69,14 @@
  
    /* Open all objects and archives in the file list. */ 
    for ( ; optind < argc; optind++) {
-@@ -514,12 +514,12 @@ int main(int argc, char *argv[])
+@@ -528,9 +528,9 @@ int main(int argc, char *argv[])
+       gp_error("linker script not specified and can't determine default script");
        return EXIT_FAILURE; 
      }
-     #ifdef HAVE_DOS_BASED_FILE_SYSTEM
--      strcpy(file_name, DOS_LKR_PATH);    
-+      strlcpy(file_name, DOS_LKR_PATH, sizeof(file_name));
-     #else
--      strcpy(file_name, GPLINK_LKR_PATH);
-+      strlcpy(file_name, GPLINK_LKR_PATH, sizeof(file_name));
-     #endif
+-    strcpy(file_name, gp_lkr_path);    
 -    strcat(file_name, COPY_CHAR);
 -    strcat(file_name, script_name);
++    strlcpy(file_name, gp_lkr_path, sizeof(file_name));
 +    strlcat(file_name, COPY_CHAR, sizeof(file_name));
 +    strlcat(file_name, script_name, sizeof(file_name));
      gp_message("using default linker script \"%s\"", file_name);
Index: patches/patch-gplink_lst_c
===================================================================
RCS file: patches/patch-gplink_lst_c
diff -N patches/patch-gplink_lst_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-gplink_lst_c	26 Jan 2004 00:01:18 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+--- gplink/lst.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ gplink/lst.c	2004-01-26 10:51:21.000000000 +1100
+@@ -78,7 +78,7 @@ lst_line(const char *format, ...)
+     return;
+ 
+   va_start(args, format);
+-  vsprintf(buffer, format, args);
++  vsnprintf(buffer, sizeof(buffer), format, args);
+   va_end(args);
+ 
+   fprintf(state.lst.f, "%s\n", buffer);
+@@ -163,7 +163,7 @@ write_src(int last_line)
+         org = line->address >> state.byte_addr;
+         data = i_memory_get(line_section->data, org);
+         assert(data & MEM_USED_MASK);
+-        gp_disassemble(line_section->data, &org, state.class, dasmbuf);
++        gp_disassemble(line_section->data, &org, state.class, dasmbuf, sizeof(dasmbuf));
+         lst_line("%06lx   %04x     %-24s %s",
+                  line->address,
+                  data & 0xffff, 
+@@ -197,8 +197,8 @@ lst_init(void)
+ {
+ 
+   if (state.lstfile != named) {
+-    strcpy(state.lstfilename, state.basefilename);
+-    strcat(state.lstfilename, ".lst");  
++    strlcpy(state.lstfilename, state.basefilename, sizeof(state.lstfilename));
++    strlcat(state.lstfilename, ".lst", sizeof(state.lstfilename));
+   }
+ 
+   if (state.lstfile == suppress) {
Index: patches/patch-gplink_map_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gplink_map_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gplink_map_c
--- patches/patch-gplink_map_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-gplink_map_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-gplink_map_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- gplink/map.c.orig	2003-07-25 12:13:07.000000000 +1000
-+++ gplink/map.c	2003-10-14 23:57:41.000000000 +1000
+--- gplink/map.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ gplink/map.c	2004-01-25 20:36:31.000000000 +1100
 @@ -44,7 +44,7 @@ map_line(const char *format, ...)
      return;
  
@@ -10,12 +10,3 @@
    va_end(args);
  
    fprintf(state.map.f, "%s\n", buffer);
-@@ -249,7 +249,7 @@ make_map(void)
-   }
- 
-   /* Determine start date */
--  gp_date_string(state.map.startdate);
-+  gp_date_string(state.map.startdate, sizeof(state.map.startdate));
- 
-   map_line("%s", GPLINK_VERSION_STRING);
-   map_line("Map File - Created %s", state.map.startdate);
Index: patches/patch-gputils_dump_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gputils_dump_c,v
retrieving revision 1.2
diff -u -w -r1.2 patch-gputils_dump_c
--- patches/patch-gputils_dump_c	14 Jan 2004 22:19:29 -0000	1.2
+++ patches/patch-gputils_dump_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-gputils_dump_c,v 1.2 2004/01/14 22:19:29 naddy Exp $
---- gputils/dump.c.orig	2003-10-09 15:18:27.000000000 +1000
-+++ gputils/dump.c	2003-10-19 22:13:53.000000000 +1000
+--- gputils/dump.c.orig	2004-01-02 10:29:37.000000000 +1100
++++ gputils/dump.c	2004-01-25 20:46:55.000000000 +1100
 @@ -28,10 +28,12 @@ Boston, MA 02111-1307, USA.  */
  
  int number_of_source_files = 0;
@@ -17,16 +17,16 @@
  
  }
  
-@@ -241,7 +243,7 @@ void dump_symbols( void )
+@@ -283,7 +285,7 @@ void dump_symbols( void )
  
  	if(temp[i*SSYMBOL_SIZE + SR_NAME])
  	  printf("%s = %x, type = %s\n",
 -		 substr(b,&temp[i*SSYMBOL_SIZE + SR_NAME],12), 
 +		 substr(b, sizeof(b), &temp[i*SSYMBOL_SIZE + SR_NAME],12), 
- 		 gp_getl16(&temp[i*SSYMBOL_SIZE + SR_VALUE]), 
+ 		 gp_getu16(&temp[i*SSYMBOL_SIZE + SR_VALUE]), 
  		 SymbolType4[(unsigned char)temp[i*SSYMBOL_SIZE + SR_TYPE]]
  		 );
-@@ -293,7 +295,7 @@ void dump_lsymbols( void )
+@@ -335,7 +337,7 @@ void dump_lsymbols( void )
  	value = gp_getb32(&s[length+3]);
  
  	printf("%s = %x, type = %s\n",
@@ -35,7 +35,7 @@
  	       value,
  	       SymbolType4[type]);
  	i += (length + 7);
-@@ -333,12 +335,14 @@ void dump_source_files( void )
+@@ -375,12 +377,14 @@ void dump_source_files( void )
        for(i=0; i<FILES_PER_BLOCK; i++) {
  
  	offset = i*FILE_SIZE;
@@ -54,7 +54,7 @@
  	  printf("%s\n",source_file_names[number_of_source_files]);
  	  source_files[number_of_source_files] = 
  	    fopen(source_file_names[number_of_source_files],"rt");
-@@ -464,7 +468,7 @@ void dump_message_area(void)
+@@ -507,7 +511,7 @@ void dump_message_area(void)
  
  	DebugType = temp[j++];
  
Index: patches/patch-gputils_gpdasm_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gputils_gpdasm_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gputils_gpdasm_c
--- patches/patch-gputils_gpdasm_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-gputils_gpdasm_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-gputils_gpdasm_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- gputils/gpdasm.c.orig	2003-10-14 22:31:20.000000000 +1000
-+++ gputils/gpdasm.c	2003-10-14 22:31:45.000000000 +1000
+--- gputils/gpdasm.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ gputils/gpdasm.c	2004-01-25 20:36:31.000000000 +1100
 @@ -131,7 +131,7 @@ void dasm(MemBlock *memory)
          } else {
            printf("        ");
@@ -8,5 +8,5 @@
 -        gp_disassemble(memory, &i, state.class, buffer);
 +        gp_disassemble(memory, &i, state.class, buffer, sizeof(buffer));
          printf("%s\n", buffer);
-         if (i != lastloc) {
+         if ((state.format) && (i != lastloc)) {
            /* some 18xx instructions use two words */
Index: patches/patch-gputils_gpvc_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-gputils_gpvc_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-gputils_gpvc_c
--- patches/patch-gputils_gpvc_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-gputils_gpvc_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-gputils_gpvc_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- gputils/gpvc.c.orig	2003-10-14 22:17:16.000000000 +1000
-+++ gputils/gpvc.c	2003-10-14 22:17:59.000000000 +1000
-@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
+--- gputils/gpvc.c.orig	2004-01-07 17:35:54.000000000 +1100
++++ gputils/gpvc.c	2004-01-25 20:36:31.000000000 +1100
+@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
    }
    
    if ((optind + 1) == argc)
Index: patches/patch-libgputils_gparchive_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-libgputils_gparchive_c,v
retrieving revision 1.2
diff -u -w -r1.2 patch-libgputils_gparchive_c
--- patches/patch-libgputils_gparchive_c	14 Jan 2004 22:19:29 -0000	1.2
+++ patches/patch-libgputils_gparchive_c	26 Jan 2004 00:01:18 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-libgputils_gparchive_c,v 1.2 2004/01/14 22:19:29 naddy Exp $
---- libgputils/gparchive.c.orig	2003-03-31 16:49:39.000000000 +1000
-+++ libgputils/gparchive.c	2003-11-23 12:55:02.000000000 +1100
+--- libgputils/gparchive.c.orig	2004-01-09 19:10:37.000000000 +1100
++++ libgputils/gparchive.c	2004-01-25 20:36:31.000000000 +1100
 @@ -50,7 +50,7 @@ gp_archive_member_name(gp_archive_type *
    char name[256];
    char *end;
@@ -28,7 +28,7 @@
      end = strrchr(&name[0], '/');
      if (end != NULL) 
        *end = '\0';
-@@ -182,16 +182,16 @@ gp_archive_add_member(gp_archive_type *a
+@@ -183,16 +183,16 @@ gp_archive_add_member(gp_archive_type *a
  
    timer = (int)time(NULL);
    
@@ -52,7 +52,7 @@
  
    oldmember = gp_archive_find_member(archive, objectname);
    
-@@ -230,9 +230,9 @@ gp_archive_extract_member(gp_archive_typ
+@@ -231,9 +231,9 @@ gp_archive_extract_member(gp_archive_typ
    /* if the object doesn't have an extension, add one.  This is done for
       some libs generated with other tools.  It should not be necessary
       for libs generated by gplib. */
@@ -64,7 +64,7 @@
  
    output_file = fopen(filename, "wb");
    if (output_file == NULL) {
-@@ -412,7 +412,7 @@ gp_archive_make_index(gp_archive_type *a
+@@ -413,7 +413,7 @@ gp_archive_make_index(gp_archive_type *a
      archive = archive->next;
          
    while (archive != NULL) {
@@ -73,7 +73,7 @@
      end = strchr(&name[0], '/');
      if (end != NULL) 
        *end = '\0';
-@@ -460,17 +460,25 @@ gp_archive_add_index(struct symbol_table
+@@ -461,17 +461,25 @@ gp_archive_add_index(struct symbol_table
  
    /* create a new member for the index and place it in the archive */
    newmember = (gp_archive_type *)malloc(sizeof(*newmember));
@@ -102,7 +102,7 @@
  
    newmember->next = archive;
    archive = newmember;
-@@ -493,8 +501,10 @@ gp_archive_add_index(struct symbol_table
+@@ -494,8 +502,10 @@ gp_archive_add_index(struct symbol_table
  
    /* write the symbol names to the member */
    for (i = 0; i < table->count; i++) {
@@ -115,7 +115,7 @@
    }
    
    return archive;
-@@ -601,7 +611,7 @@ gp_archive_print_table(struct symbol_tab
+@@ -602,7 +612,7 @@ gp_archive_print_table(struct symbol_tab
      member = get_symbol_annotation(lst[i]);
      assert(member != NULL);
      /* determine the archive member name */
Index: patches/patch-libgputils_gpcofflink_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-libgputils_gpcofflink_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-libgputils_gpcofflink_c
--- patches/patch-libgputils_gpcofflink_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-libgputils_gpcofflink_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-libgputils_gpcofflink_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- libgputils/gpcofflink.c.orig	2003-09-28 15:20:26.000000000 +1000
-+++ libgputils/gpcofflink.c	2003-10-19 01:24:55.000000000 +1000
-@@ -404,8 +404,8 @@ _create_rom_section(gp_object_type *obje
+--- libgputils/gpcofflink.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ libgputils/gpcofflink.c	2004-01-25 20:36:31.000000000 +1100
+@@ -415,8 +415,8 @@ _create_rom_section(gp_object_type *obje
    int last;
    
    /* create the new section */
@@ -12,7 +12,7 @@
    new = gp_coffgen_newsection(name);
  
    /* select "retlw" instruction */  
-@@ -536,8 +536,8 @@ gp_add_cinit_section(gp_object_type *obj
+@@ -547,8 +547,8 @@ gp_add_cinit_section(gp_object_type *obj
      while (section != NULL) {
        if (section->flags & STYP_DATA) {
          /* locate the rom table */
@@ -23,7 +23,7 @@
          prog_section = gp_coffgen_findsection(object, 
                                                object->sections, 
                                                prog_name);
-@@ -1038,7 +1038,7 @@ gp_cofflink_fill_pages(gp_object_type *o
+@@ -1049,7 +1049,7 @@ gp_cofflink_fill_pages(gp_object_type *o
                                   &current_address,
                                   &current_size);
            if (found == 1) {
Index: patches/patch-libgputils_gpmemory_c
===================================================================
RCS file: patches/patch-libgputils_gpmemory_c
diff -N patches/patch-libgputils_gpmemory_c
--- patches/patch-libgputils_gpmemory_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libgputils_gpmemory_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- libgputils/gpmemory.c.orig	2003-10-19 10:53:32.000000000 +1000
-+++ libgputils/gpmemory.c	2003-10-19 10:53:47.000000000 +1000
-@@ -92,7 +92,7 @@ MemBlock * i_memory_new(MemBlock *m, Mem
- 
-   base = base_address >> I_MEM_BITS;
- 
--  mbp->memory = (unsigned int *)malloc(MAX_I_MEM * sizeof(unsigned int));
-+  mbp->memory = (unsigned int *)calloc(MAX_I_MEM * sizeof(unsigned int), 1);
-   mbp->base   = base;
- 
-   do {
Index: patches/patch-libgputils_gpsystem_c
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-libgputils_gpsystem_c,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-libgputils_gpsystem_c
--- patches/patch-libgputils_gpsystem_c	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-libgputils_gpsystem_c	26 Jan 2004 00:01:18 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-libgputils_gpsystem_c,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- libgputils/gpsystem.c.orig	2003-10-14 23:54:47.000000000 +1000
-+++ libgputils/gpsystem.c	2003-10-14 23:55:19.000000000 +1000
-@@ -126,14 +126,14 @@ gp_putb32(char *addr, long data)
+--- libgputils/gpsystem.c.orig	2004-01-17 13:33:51.000000000 +1100
++++ libgputils/gpsystem.c	2004-01-25 20:36:32.000000000 +1100
+@@ -168,14 +168,14 @@ gp_putb32(char *addr, long data)
  }
  
  void
Index: patches/patch-libgputils_gpsystem_h
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/gputils/patches/patch-libgputils_gpsystem_h,v
retrieving revision 1.1.1.1
diff -u -w -r1.1.1.1 patch-libgputils_gpsystem_h
--- patches/patch-libgputils_gpsystem_h	3 Nov 2003 01:02:36 -0000	1.1.1.1
+++ patches/patch-libgputils_gpsystem_h	26 Jan 2004 00:01:18 -0000
@@ -1,11 +1,12 @@
 $OpenBSD: patch-libgputils_gpsystem_h,v 1.1.1.1 2003/11/03 01:02:36 naddy Exp $
---- libgputils/gpsystem.h.orig	2003-10-14 23:55:53.000000000 +1000
-+++ libgputils/gpsystem.h	2003-10-14 23:56:12.000000000 +1000
-@@ -33,6 +33,6 @@ void  gp_putl32(char *addr, long data);
+--- libgputils/gpsystem.h.orig	2004-01-07 17:35:54.000000000 +1100
++++ libgputils/gpsystem.h	2004-01-25 20:36:32.000000000 +1100
+@@ -40,7 +40,7 @@ void  gp_putl32(char *addr, long data);
  long  gp_getb32(char *addr);
  void  gp_putb32(char *addr, long data);
  
 -void  gp_date_string(char *buffer);
 +void  gp_date_string(char *buffer, size_t sizeof_buffer);
+ char *gp_lower_case(char *name);
  
- #endif
+ typedef struct gp_list_struct gp_linked_list;

Visit your host, monkey.org