Module Name: src Committed By: kre Date: Tue Oct 29 11:37:58 UTC 2024
Modified Files: src/sys/arch/macppc/stand/fixcoff: fixcoff.c Log Message: Portability fixes from Jan-Benedict Glaw The args to help() and usage() need to be const char * and main() should be declared as returning int. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/macppc/stand/fixcoff/fixcoff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/macppc/stand/fixcoff/fixcoff.c diff -u src/sys/arch/macppc/stand/fixcoff/fixcoff.c:1.12 src/sys/arch/macppc/stand/fixcoff/fixcoff.c:1.13 --- src/sys/arch/macppc/stand/fixcoff/fixcoff.c:1.12 Wed Jun 23 20:20:44 2021 +++ src/sys/arch/macppc/stand/fixcoff/fixcoff.c Tue Oct 29 11:37:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: fixcoff.c,v 1.12 2021/06/23 20:20:44 cjep Exp $ */ +/* $NetBSD: fixcoff.c,v 1.13 2024/10/29 11:37:57 kre Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -106,13 +106,13 @@ struct aouthdr { #define RS6K_AOUTHDR_ZMAGIC 0x010B void -usage(char *prog) +usage(const char *prog) { fprintf(stderr, "Usage: %s [-h] | [<file to fix>]\n", prog); } void -help(char *prog) +help(const char *prog) { fprintf(stderr, "%s\tis designed to fix the xcoff headers in a\n",prog); fprintf(stderr, @@ -121,6 +121,7 @@ help(char *prog) exit(0); } +int main(int argc, char * const *argv) { int fd, i, n, ch;