diff --git a/contrib/a2boot/a2boot.c b/contrib/a2boot/a2boot.c index 2fdf62a8f2..3d428e27ae 100644 --- a/contrib/a2boot/a2boot.c +++ b/contrib/a2boot/a2boot.c @@ -67,6 +67,7 @@ char *bad = "Bad request!"; char buf[ 4624 ]; char *server; int32_t fileoff; +static char *version = VERSION; long a2bootreq(char *fname); @@ -125,7 +126,7 @@ int main( int ac, char **av ) } server = hostname; - while (( c = getopt( ac, av, "dn:" )) != EOF ) { + while (( c = getopt( ac, av, "dVvn:" )) != EOF ) { switch ( c ) { case 'd' : debug++; @@ -133,6 +134,14 @@ int main( int ac, char **av ) case 'n' : server = optarg; break; + case 'V' : + case 'v' : + fprintf(stdout, "a2boot %s - Apple2 Netboot Daemon\n" + "Copyright (c) 1990,1992 Regents of The University of Michigan.\n" + "\tAll Rights Reserved.\n" + "Copyright (c) 1990, The University of Melbourne.\n", version ); + exit ( 1 ); + break; default : fprintf( stderr, "Unknown option -- '%c'\n", c ); usage( *av ); diff --git a/contrib/a2boot/meson.build b/contrib/a2boot/meson.build index dfaa3ed255..aa46992df0 100644 --- a/contrib/a2boot/meson.build +++ b/contrib/a2boot/meson.build @@ -6,6 +6,7 @@ a2boot_c_args = [ + pkgconfdir + '/a2boot/Apple :2f:2fe Boot Blocks"', '-D_PATH_P16_IMAGE="' + pkgconfdir + '/a2boot/ProDOS16 Image"', + dversion, ] executable( diff --git a/contrib/macipgw/main.c b/contrib/macipgw/main.c index c1cf42cf6f..774d0a0d9e 100644 --- a/contrib/macipgw/main.c +++ b/contrib/macipgw/main.c @@ -18,6 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + #include #include #include @@ -46,17 +50,10 @@ #include "tunnel.h" #include "util.h" -static char *version = "macipgw 1.1\n" - "Copyright (c) 1997 Stefan Bethke. All rights reserved.\n" - "Copyright (c) 1988, 1992, 1993\n" - "\tThe Regents of the University of California. All rights reserved.\n" - "Copyright (c) 1990,1996 Regents of The University of Michigan.\n" - "\tAll Rights Reserved.\n" - "See the file COPYRIGHT for further information.\n"; - int atsocket; int tundev; int debug = 0; +static char *version = VERSION; static void die(int n) { @@ -179,21 +176,27 @@ int main(int argc, char *argv[]) gDebug = 0; - while ((opt = getopt(argc, argv, "Vd:n:u:z:")) != -1) { + while ((opt = getopt(argc, argv, "Vvd:n:u:z:")) != -1) { switch (opt) { case 'd': gDebug = strtol(optarg, 0, 0); break; - case 'n': ns = atoip(optarg); break; - case 'z': zone = optarg; - break; - case 'V': - usage(version); + break; + case 'V': + case 'v': + fprintf(stdout, "macipgw %s - Mac IP Gateway Daemon\n" + "Copyright (c) 1997, 2013 Stefan Bethke. All rights reserved.\n" + "Copyright (c) 1988, 1992, 1993\n" + "\tThe Regents of the University of California. All rights reserved.\n" + "Copyright (c) 1990, 1996 Regents of The University of Michigan.\n" + "\tAll Rights Reserved.\n" + "See the file COPYRIGHT for further information.\n", version); + exit(1); break; case 'u': pwd = get_user(optarg); diff --git a/contrib/macipgw/meson.build b/contrib/macipgw/meson.build index 362c9187fe..ac98d2e58c 100644 --- a/contrib/macipgw/meson.build +++ b/contrib/macipgw/meson.build @@ -10,7 +10,7 @@ macipgw_sources = [ macipgw_includes = include_directories('../../libatalk/atp') -macipgw_c_args = ['-DSERVERTEXT="' + pkgconfdir + '/msg"'] +macipgw_c_args = ['-DSERVERTEXT="' + pkgconfdir + '/msg"', dversion] executable( 'macipgw', diff --git a/contrib/timelord/meson.build b/contrib/timelord/meson.build index dc57ff20be..084cb47ec1 100644 --- a/contrib/timelord/meson.build +++ b/contrib/timelord/meson.build @@ -3,6 +3,7 @@ executable( 'timelord.c', include_directories: root_includes, link_with: libatalk, + c_args: dversion, install: true, install_dir: sbindir, build_rpath: rpath_libdir, diff --git a/contrib/timelord/timelord.c b/contrib/timelord/timelord.c index c2cb72479b..d2cea02992 100644 --- a/contrib/timelord/timelord.c +++ b/contrib/timelord/timelord.c @@ -60,6 +60,7 @@ int debug = 0; char *bad = "Bad request!"; char buf[ 4624 ]; char *server; +static char *version = VERSION; void usage( char *p ) { @@ -113,7 +114,7 @@ int main( int ac, char **av ) } server = hostname; - while (( c = getopt( ac, av, "dln:" )) != EOF ) { + while (( c = getopt( ac, av, "dlVvn:" )) != EOF ) { switch ( c ) { case 'd' : debug++; @@ -124,6 +125,14 @@ int main( int ac, char **av ) case 'n' : server = optarg; break; + case 'V' : + case 'v' : + fprintf(stdout, "timelord %s - Timelord Time Server Daemon\n" + "Copyright (c) 1990,1992 Regents of The University of Michigan.\n" + "\tAll Rights Reserved.\n" + "Copyright (c) 1990, The University of Melbourne.\n", version ); + exit ( 1 ); + break; default : fprintf( stderr, "Unknown option -- '%c'\n", c ); usage( *av ); diff --git a/doc/ja/manpages/man8/a2boot.8.xml b/doc/ja/manpages/man8/a2boot.8.xml index 4d56158de5..f9a160f4d1 100644 --- a/doc/ja/manpages/man8/a2boot.8.xml +++ b/doc/ja/manpages/man8/a2boot.8.xml @@ -27,6 +27,8 @@ -d -n nbpname + + -v @@ -79,6 +81,14 @@ として登録します。デフォルトではホスト名になります。 + + + -v + + + バージョン情報を出力して終了します。 + + diff --git a/doc/ja/manpages/man8/macipgw.8.xml b/doc/ja/manpages/man8/macipgw.8.xml index 5285f258a5..78f0e8dab9 100644 --- a/doc/ja/manpages/man8/macipgw.8.xml +++ b/doc/ja/manpages/man8/macipgw.8.xml @@ -32,7 +32,7 @@ -z zone - -V + -v network @@ -112,7 +112,7 @@ - -V + -v バージョン情報を表示して終了します。 diff --git a/doc/ja/manpages/man8/papd.8.xml b/doc/ja/manpages/man8/papd.8.xml index 300327bc96..ebcc85ebe7 100644 --- a/doc/ja/manpages/man8/papd.8.xml +++ b/doc/ja/manpages/man8/papd.8.xml @@ -37,6 +37,8 @@ -p printcap -P pidfile + + -v @@ -110,6 +112,14 @@ papd がプロセス ID を保存するファイルを指定します。 + + + -v + + + バージョン情報を出力して終了します。 + + diff --git a/doc/ja/manpages/man8/timelord.8.xml b/doc/ja/manpages/man8/timelord.8.xml index 90d5446450..c43c54fd98 100644 --- a/doc/ja/manpages/man8/timelord.8.xml +++ b/doc/ja/manpages/man8/timelord.8.xml @@ -29,6 +29,8 @@ -l -n nbpname + + -v @@ -75,6 +77,14 @@ として登録します。デフォルトではホスト名になります。 + + + -v + + + バージョン情報を出力して終了します。 + + diff --git a/doc/manpages/man8/a2boot.8.xml b/doc/manpages/man8/a2boot.8.xml index 08444423a7..8033120985 100644 --- a/doc/manpages/man8/a2boot.8.xml +++ b/doc/manpages/man8/a2boot.8.xml @@ -25,6 +25,8 @@ -d -n nbpname + + -v @@ -80,6 +82,14 @@ remap="I">nbpname. This defaults to the hostname. + + + -v + + + Print version information and exit. + + diff --git a/doc/manpages/man8/macipgw.8.xml b/doc/manpages/man8/macipgw.8.xml index d96e934922..2fadc7478e 100644 --- a/doc/manpages/man8/macipgw.8.xml +++ b/doc/manpages/man8/macipgw.8.xml @@ -32,7 +32,7 @@ -z zone - -V + -v network @@ -118,7 +118,7 @@ - -V + -v Show version information and exit. diff --git a/doc/manpages/man8/papd.8.xml b/doc/manpages/man8/papd.8.xml index 955b84b5e6..5066c48385 100644 --- a/doc/manpages/man8/papd.8.xml +++ b/doc/manpages/man8/papd.8.xml @@ -35,6 +35,8 @@ -p printcap -P pidfile + + -v @@ -116,6 +118,14 @@ process id. + + + -v + + + Print version information and exit. + + diff --git a/doc/manpages/man8/timelord.8.xml b/doc/manpages/man8/timelord.8.xml index b8ee495256..a434ecaa4e 100644 --- a/doc/manpages/man8/timelord.8.xml +++ b/doc/manpages/man8/timelord.8.xml @@ -27,6 +27,8 @@ -l -n nbpname + + -v @@ -76,6 +78,14 @@ remap="I">nbpname. This defaults to the hostname. + + + -v + + + Print version information and exit. + + diff --git a/etc/atalkd/main.c b/etc/atalkd/main.c index 64c07e4d28..814c101283 100644 --- a/etc/atalkd/main.c +++ b/etc/atalkd/main.c @@ -818,7 +818,7 @@ int main( int ac, char **av) socklen_t fromlen; char *prog; - while (( c = getopt( ac, av, "12df:P:tv" )) != EOF ) { + while (( c = getopt( ac, av, "12dtVvf:P:" )) != EOF ) { switch ( c ) { case '1' : defphase = IFACE_PHASE1; @@ -844,8 +844,9 @@ int main( int ac, char **av) transition++; break; + case 'V' : case 'v' : /* version */ - printf( "atalkd (version %s)\n", version ); + printf( "atalkd %s - AppleTalk Network Manager Daemon\n", version ); exit ( 1 ); break; diff --git a/etc/papd/main.c b/etc/papd/main.c index 4edac45497..4b32d1f5f4 100644 --- a/etc/papd/main.c +++ b/etc/papd/main.c @@ -4,7 +4,7 @@ */ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif /* HAVE_CONFIG_H */ #include @@ -203,7 +203,7 @@ int main(int ac, char **av) defprinter.p_pagecost_msg = NULL; defprinter.p_lock = "lock"; - while (( c = getopt( ac, av, "adf:p:P:v" )) != EOF ) { + while (( c = getopt( ac, av, "adVvf:p:P:" )) != EOF ) { switch ( c ) { case 'a' : /* for compatibility with old papd */ break; @@ -224,8 +224,9 @@ int main(int ac, char **av) pidfile = optarg; break; + case 'V' : case 'v' : /* version */ - printf( "papd (version %s)\n", VERSION ); + printf( "papd %s - Printer Access Protocol Daemon\n", version ); exit ( 1 ); break;