head 1.3; access; symbols pkgsrc-2026Q1:1.3.0.90 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.88 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.3.0.86 pkgsrc-2025Q3-base:1.3 pkgsrc-2025Q2:1.3.0.84 pkgsrc-2025Q2-base:1.3 pkgsrc-2025Q1:1.3.0.82 pkgsrc-2025Q1-base:1.3 pkgsrc-2024Q4:1.3.0.80 pkgsrc-2024Q4-base:1.3 pkgsrc-2024Q3:1.3.0.78 pkgsrc-2024Q3-base:1.3 pkgsrc-2024Q2:1.3.0.76 pkgsrc-2024Q2-base:1.3 pkgsrc-2024Q1:1.3.0.74 pkgsrc-2024Q1-base:1.3 pkgsrc-2023Q4:1.3.0.72 pkgsrc-2023Q4-base:1.3 pkgsrc-2023Q3:1.3.0.70 pkgsrc-2023Q3-base:1.3 pkgsrc-2023Q2:1.3.0.68 pkgsrc-2023Q2-base:1.3 pkgsrc-2023Q1:1.3.0.66 pkgsrc-2023Q1-base:1.3 pkgsrc-2022Q4:1.3.0.64 pkgsrc-2022Q4-base:1.3 pkgsrc-2022Q3:1.3.0.62 pkgsrc-2022Q3-base:1.3 pkgsrc-2022Q2:1.3.0.60 pkgsrc-2022Q2-base:1.3 pkgsrc-2022Q1:1.3.0.58 pkgsrc-2022Q1-base:1.3 pkgsrc-2021Q4:1.3.0.56 pkgsrc-2021Q4-base:1.3 pkgsrc-2021Q3:1.3.0.54 pkgsrc-2021Q3-base:1.3 pkgsrc-2021Q2:1.3.0.52 pkgsrc-2021Q2-base:1.3 pkgsrc-2021Q1:1.3.0.50 pkgsrc-2021Q1-base:1.3 pkgsrc-2020Q4:1.3.0.48 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.46 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.42 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.22 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.44 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.40 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.38 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.36 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.34 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.32 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.30 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.28 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.26 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.24 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.20 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.18 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.16 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.14 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.12 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.10 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.8 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.6 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.4 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.3.0.2 pkgsrc-2015Q1-base:1.3 pkgsrc-2014Q4:1.2.0.28 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.26 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.24 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.22 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.20 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.18 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.16 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.14 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.12 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.10 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.8 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.6 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.4 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.2 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.1.0.26 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.24 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.22 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.20 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.18 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.16 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.14 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.12 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.10 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.8 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.6 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.4 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.2 cube-native-xorg-base:1.1; locks; strict; comment @# @; 1.3 date 2015.02.23.18.20.21; author joerg; state Exp; branches; next 1.2; commitid O8kxiNWpOsat4aby; 1.2 date 2011.08.29.01.39.12; author dholland; state Exp; branches; next 1.1; 1.1 date 2008.08.02.21.46.33; author dholland; state Exp; branches; next ; desc @@ 1.3 log @Fix format strings. Use fixed sized types to hopefully get it to work on all little endian platforms. @ text @$NetBSD: patch-ab,v 1.2 2011/08/29 01:39:12 dholland Exp $ - build on LP64 - fix mismatched return statements, which clang dislikes --- ld/catimage.c.orig 1997-07-22 21:38:12.000000000 +0000 +++ ld/catimage.c @@@@ -21,11 +21,11 @@@@ */ #include +#include +#include #include "x86_aout.h" -#ifndef __OUT_OK -#error "Compile error: struct exec invalid (long not 32 bit ?)" -#endif +static void patch_bin(long, int); unsigned long text_offt[10]; /* Locations to patch (0=don't) */ unsigned long data_offt[10]; @@@@ -35,11 +34,12 @@@@ FILE * ofd; FILE * ifd = 0; struct exec header; +int main(argc, argv) int argc; char ** argv; { - long image_offset, text_off; + Long image_offset, text_off; int image_id; if( argc < 3 || argc > 11 ) @@@@ -59,8 +59,10 @@@@ char ** argv; open_obj(argv[image_id+2]); printf("File %-14s seg=0x%04lx text=0x%04lx data=0x%04lx\n", - input_file, (image_offset>>4), - (header.a_text>>4), (header.a_total>>4)); + input_file, + (unsigned long)(image_offset>>4), + (unsigned long)(header.a_text>>4), + (unsigned long)(header.a_total>>4)); text_off = image_offset; if( header.a_flags & A_SEP ) @@@@ -90,7 +92,7 @@@@ char ** argv; fputc('\0', ofd); fclose(ofd); - printf("Output file size %ldKb\n", ((image_offset+0x3FF)>>10)); + printf("Output file size %ldKb\n", (long)((image_offset+0x3FF)>>10)); if( ifd ) fclose(ifd); exit(0); @@@@ -139,6 +141,7 @@@@ long out_offset, in_offset, length; } } +void patch_bin(file_off, value) long file_off; int value; @@@@ -162,7 +165,7 @@@@ read_symtable() { struct nlist item; int nitems; - long base_off = 0; + Long base_off = 0; if( header.a_syms == 0 ) fatal("Input file has been stripped!"); @ 1.2 log @Fix mismatched return statements, which clang dislikes @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 2008/08/02 21:46:33 dholland Exp $ d8 2 a9 3 @@@@ -27,6 +27,8 @@@@ #error "Compile error: struct exec invalid (long not 32 bit ?)" #endif d11 8 d20 1 a20 1 + d23 1 a23 2 @@@@ -35,11 +37,12 @@@@ FILE * ofd; d37 1 a37 1 @@@@ -59,8 +62,10 @@@@ char ** argv; d50 1 a50 1 @@@@ -90,7 +95,7 @@@@ char ** argv; d59 1 a59 1 @@@@ -139,6 +144,7 @@@@ long out_offset, in_offset, length; d67 1 a67 1 @@@@ -162,7 +168,7 @@@@ read_symtable() @ 1.1 log @Make this build on amd64. Probably doesn't have that good odds of working, but it's a step. @ text @d1 1 a1 1 $NetBSD$ d3 20 a22 3 --- ld/catimage.c~ 1997-07-22 17:38:12.000000000 -0400 +++ ld/catimage.c 2008-08-02 17:43:47.000000000 -0400 @@@@ -39,7 +39,7 @@@@ main(argc, argv) d31 1 a31 1 @@@@ -59,8 +59,10 @@@@ char ** argv; d44 1 a44 1 @@@@ -90,7 +92,7 @@@@ char ** argv; d53 9 a61 1 @@@@ -162,7 +164,7 @@@@ read_symtable() @