[Dhcp-agent-commits] CVS: dhcp-agent THANKS,1.6,1.7 acconfig.h,1.4,1.5 config.h.in,1.8,1.9 configure
Status: Alpha
Brought to you by:
actmodern
Update of /cvsroot/dhcp-agent/dhcp-agent In directory usw-pr-cvs1:/tmp/cvs-serv28683 Modified Files: THANKS acconfig.h config.h.in configure configure.in dhcp-agent.h dhcp-arp-discovery.c dhcp-arp.c dhcp-cache-entry.c dhcp-client-cache.c dhcp-client-conf.c dhcp-client-control.c dhcp-client-states.c dhcp-client.c dhcp-com.c dhcp-convert.c dhcp-daemon.c dhcp-eth.c dhcp-files.c dhcp-globconf.c dhcp-icmp-discovery.c dhcp-icmp.c dhcp-interface.c dhcp-ip.c dhcp-list.c dhcp-log.c dhcp-net.c dhcp-packet-build.c dhcp-print.c dhcp-route.c dhcp-rtt.c dhcp-sniff.c dhcp-sysconf.c dhcp-udp.c dhcp-util.c Log Message: __progname subsitution and getprogname() substitution; moved dhcp-util routines to their own header file Index: THANKS =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/THANKS,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** THANKS 3 Jun 2002 01:36:04 -0000 1.6 --- THANKS 6 Jun 2002 23:59:00 -0000 1.7 *************** *** 15,16 **** --- 15,19 ---- -- Bill Traynor for Solaris x86. + + -- Brian J. Kifiak for OpenBSD help/testing and helpful suggestions. + Index: acconfig.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/acconfig.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** acconfig.h 5 Jun 2002 03:00:59 -0000 1.4 --- acconfig.h 6 Jun 2002 23:59:00 -0000 1.5 *************** *** 2,5 **** --- 2,9 ---- * our own pri macros. */ + /* have __progname var */ + #undef HAVE_PROGNAME + + /* have PRI* marcos */ #undef HAVE_PRIMACROS_H Index: config.h.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/config.h.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** config.h.in 5 Jun 2002 03:00:59 -0000 1.8 --- config.h.in 6 Jun 2002 23:59:00 -0000 1.9 *************** *** 23,26 **** --- 23,29 ---- #undef HAVE_GETOPT_H + /* Define if you have the `getprogname' function. */ + #undef HAVE_GETPROGNAME + /* Define if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE Index: configure =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** configure 6 Jun 2002 03:25:04 -0000 1.16 --- configure 6 Jun 2002 23:59:00 -0000 1.17 *************** *** 2555,2559 **** fi ! for ac_func in strdup uname calloc daemon rename sysconf getrusage do ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` --- 2555,2559 ---- fi ! for ac_func in strdup uname calloc daemon rename sysconf getrusage getprogname do ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` *************** *** 2703,2707 **** #line 2703 "configure" #include "confdefs.h" ! #include <sys/types> #include <sys/time.h> #include <sys/ioctl.h> --- 2703,2707 ---- #line 2703 "configure" #include "confdefs.h" ! #include <sys/types.h> #include <sys/time.h> #include <sys/ioctl.h> *************** *** 2748,2752 **** fi ! echo "$as_me:2750: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then --- 2748,2796 ---- fi ! echo "$as_me:2750: checking for __progname" >&5 ! echo $ECHO_N "checking for __progname... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line 2753 "configure" ! #include "confdefs.h" ! ! #include <stdlib.h> ! #include <stdio.h> ! ! int ! main () ! { ! ! const char *s = __progname; ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2770: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:2773: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2776: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2779: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! cat >>confdefs.h <<\EOF ! #define HAVE_PROGNAME 1 ! EOF ! , echo "$as_me:2784: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! echo "$as_me:2789: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext; ! ! echo "$as_me:2794: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then *************** *** 2754,2758 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2756 "configure" #include "confdefs.h" #include <signal.h> --- 2798,2802 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2800 "configure" #include "confdefs.h" #include <signal.h> *************** *** 2770,2783 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2772: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2775: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2778: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2781: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes --- 2814,2827 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2816: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2819: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2822: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2825: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes *************** *** 2789,2793 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2791: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then --- 2833,2837 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2835: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then *************** *** 2798,2802 **** fi ! echo "$as_me:2800: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then --- 2842,2846 ---- fi ! echo "$as_me:2844: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then *************** *** 2804,2808 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2806 "configure" #include "confdefs.h" #include <sys/types.h> --- 2848,2852 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2850 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 2826,2839 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2828: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2831: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2834: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2837: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void --- 2870,2883 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2872: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2875: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2878: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2881: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void *************** *** 2845,2849 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2847: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 --- 2889,2893 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2891: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 *************** *** 2854,2858 **** if test -z "$pcap_prefix"; then ! echo "$as_me:2856: checking for pcap library directory" >&5 echo $ECHO_N "checking for pcap library directory... $ECHO_C" >&6 ac_pcap_lib_dir="none" --- 2898,2902 ---- if test -z "$pcap_prefix"; then ! echo "$as_me:2900: checking for pcap library directory" >&5 echo $ECHO_N "checking for pcap library directory... $ECHO_C" >&6 ac_pcap_lib_dir="none" *************** *** 2865,2869 **** if test $ac_pcap_lib_dir = "none" ; then ! { { echo "$as_me:2867: error: I cannot find the pcap library anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 --- 2909,2913 ---- if test $ac_pcap_lib_dir = "none" ; then ! { { echo "$as_me:2911: error: I cannot find the pcap library anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 *************** *** 2874,2882 **** fi ! echo "$as_me:2876: result: $ac_pcap_lib_dir" >&5 echo "${ECHO_T}$ac_pcap_lib_dir" >&6 PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" ! echo "$as_me:2880: checking for pcap header directory" >&5 echo $ECHO_N "checking for pcap header directory... $ECHO_C" >&6 ac_pcap_header_dir="none" --- 2918,2926 ---- fi ! echo "$as_me:2920: result: $ac_pcap_lib_dir" >&5 echo "${ECHO_T}$ac_pcap_lib_dir" >&6 PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" ! echo "$as_me:2924: checking for pcap header directory" >&5 echo $ECHO_N "checking for pcap header directory... $ECHO_C" >&6 ac_pcap_header_dir="none" *************** *** 2889,2893 **** if test $ac_pcap_header_dir = "none" ; then ! { { echo "$as_me:2891: error: I cannot find the pcap header file anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 --- 2933,2937 ---- if test $ac_pcap_header_dir = "none" ; then ! { { echo "$as_me:2935: error: I cannot find the pcap header file anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 *************** *** 2898,2902 **** fi ! echo "$as_me:2900: result: $ac_pcap_header_dir" >&5 echo "${ECHO_T}$ac_pcap_header_dir" >&6 PCAP_INC="-I$ac_pcap_header_dir" --- 2942,2946 ---- fi ! echo "$as_me:2944: result: $ac_pcap_header_dir" >&5 echo "${ECHO_T}$ac_pcap_header_dir" >&6 PCAP_INC="-I$ac_pcap_header_dir" *************** *** 2915,2919 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 ! echo "$as_me:2917: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DNET_PATH+set}" = set; then --- 2959,2963 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 ! echo "$as_me:2961: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DNET_PATH+set}" = set; then *************** *** 2932,2936 **** if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_DNET_PATH="$ac_dir/$ac_word" ! echo "$as_me:2934: found $ac_dir/$ac_word" >&5 break fi --- 2976,2980 ---- if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_DNET_PATH="$ac_dir/$ac_word" ! echo "$as_me:2978: found $ac_dir/$ac_word" >&5 break fi *************** *** 2943,2950 **** if test -n "$DNET_PATH"; then ! echo "$as_me:2945: result: $DNET_PATH" >&5 echo "${ECHO_T}$DNET_PATH" >&6 else ! echo "$as_me:2948: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2987,2994 ---- if test -n "$DNET_PATH"; then ! echo "$as_me:2989: result: $DNET_PATH" >&5 echo "${ECHO_T}$DNET_PATH" >&6 else ! echo "$as_me:2992: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 2956,2960 **** if test $DNET_PATH = "no"; then ! echo "$as_me:2958: checking for eth_open in -ldnet" >&5 echo $ECHO_N "checking for eth_open in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_eth_open+set}" = set; then --- 3000,3004 ---- if test $DNET_PATH = "no"; then ! echo "$as_me:3002: checking for eth_open in -ldnet" >&5 echo $ECHO_N "checking for eth_open in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_eth_open+set}" = set; then *************** *** 2964,2968 **** LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 2966 "configure" #include "confdefs.h" --- 3008,3012 ---- LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3010 "configure" #include "confdefs.h" *************** *** 2983,2996 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:2985: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:2988: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:2991: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2994: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_eth_open=yes --- 3027,3040 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3029: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3032: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3035: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3038: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_eth_open=yes *************** *** 3003,3012 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3005: result: $ac_cv_lib_dnet_eth_open" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_eth_open" >&6 if test $ac_cv_lib_dnet_eth_open = yes; then DNET_LIB="-ldnet" else ! { { echo "$as_me:3010: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&5 echo "$as_me: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&2;} { (exit 1); exit 1; }; } --- 3047,3056 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3049: result: $ac_cv_lib_dnet_eth_open" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_eth_open" >&6 if test $ac_cv_lib_dnet_eth_open = yes; then DNET_LIB="-ldnet" else ! { { echo "$as_me:3054: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&5 echo "$as_me: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&2;} { (exit 1); exit 1; }; } *************** *** 3115,3119 **** ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:3117: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF --- 3159,3163 ---- ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:3161: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF *************** *** 3291,3295 **** --he | --h) # Conflict between --help and --header ! { { echo "$as_me:3293: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 --- 3335,3339 ---- --he | --h) # Conflict between --help and --header ! { { echo "$as_me:3337: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 *************** *** 3315,3324 **** # This is an error. ! -*) { { echo "$as_me:3317: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; ! *) { { echo "$as_me:3322: error: invalid argument: $1" >&5 echo "$as_me: error: invalid argument: $1" >&2;} { (exit 1); exit 1; }; };; --- 3359,3368 ---- # This is an error. ! -*) { { echo "$as_me:3361: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; ! *) { { echo "$as_me:3366: error: invalid argument: $1" >&5 echo "$as_me: error: invalid argument: $1" >&2;} { (exit 1); exit 1; }; };; *************** *** 3561,3565 **** if test x"$ac_file" != x-; then ! { echo "$as_me:3563: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" --- 3605,3609 ---- if test x"$ac_file" != x-; then ! { echo "$as_me:3607: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" *************** *** 3579,3583 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3581: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3623,3627 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3625: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3592,3596 **** else # /dev/null tree ! { { echo "$as_me:3594: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3636,3640 ---- else # /dev/null tree ! { { echo "$as_me:3638: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3653,3657 **** esac ! test x"$ac_file" != x- && { echo "$as_me:3655: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} --- 3697,3701 ---- esac ! test x"$ac_file" != x- && { echo "$as_me:3699: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} *************** *** 3664,3668 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3666: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3708,3712 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3710: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3677,3681 **** else # /dev/null tree ! { { echo "$as_me:3679: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3721,3725 ---- else # /dev/null tree ! { { echo "$as_me:3723: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3794,3798 **** if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:3796: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else --- 3838,3842 ---- if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:3840: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else Index: configure.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.in,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** configure.in 5 Jun 2002 03:00:59 -0000 1.16 --- configure.in 6 Jun 2002 23:59:00 -0000 1.17 *************** *** 40,44 **** dnl check for functions ! AC_CHECK_FUNCS(strdup uname calloc daemon rename sysconf getrusage) AC_CHECK_FUNCS(sprintf vsnprintf, --- 40,44 ---- dnl check for functions ! AC_CHECK_FUNCS(strdup uname calloc daemon rename sysconf getrusage getprogname) AC_CHECK_FUNCS(sprintf vsnprintf, *************** *** 50,57 **** AC_CHECK_TYPE(struct bpf_timeval, [AC_DEFINE(HAVE_BPF_TIMEVAL)], [], ! [#include <sys/types> #include <sys/time.h> #include <sys/ioctl.h> #include <net/bpf.h> ]) AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T)], [], [#include <signal.h>]) --- 50,65 ---- AC_CHECK_TYPE(struct bpf_timeval, [AC_DEFINE(HAVE_BPF_TIMEVAL)], [], ! [#include <sys/types.h> #include <sys/time.h> #include <sys/ioctl.h> #include <net/bpf.h> ]) + + AC_MSG_CHECKING(for __progname) + AC_TRY_COMPILE([ + #include <stdlib.h> + #include <stdio.h> + ],[ + const char *s = __progname; + ], [ AC_DEFINE(HAVE_PROGNAME), AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)]); AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T)], [], [#include <signal.h>]) Index: dhcp-agent.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-agent.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** dhcp-agent.h 6 Jun 2002 03:27:25 -0000 1.49 --- dhcp-agent.h 6 Jun 2002 23:59:00 -0000 1.50 *************** *** 57,60 **** --- 57,65 ---- # include <config.h> + #if !defined(HAVE_PROGNAME) + /* must be placed in main source of each binary. */ + extern const char *__progname; + #endif + #if defined(HAVE_GETOPT_H) *************** *** 559,596 **** extern void setup_interrupt_handlers(void); - /* Utility functions. */ - - /* in case strdup is not available. */ - - # ifndef HAVE_STRDUP - extern char *strdup(char *s); - # endif /* HAVE_STRDUP */ - - extern void error_message(char *fmt, ...); - extern void fatal_error(char *fmt, ...); - extern void warn_message(char *fmt, ...); - extern void debug_message(char *fmt, ...); - - extern int get_verbosity_level(void); - extern int set_verbosity_level(int verbosity_level_to_set); - - extern void *xmalloc(size_t size); - extern void *xcalloc(size_t size); - extern void xfree(void *p); - extern int check_for_interrupts(void); - extern void suspend_for_interrupts(void); - extern void block_interrupts(void); - extern void add_interrupt_handler(int sigtype, void (*sighandler)(int)); - extern void info_message(char *fmt, ...); - extern char *splice_string(const char *s1, const char *s2); - extern char *splice_many_strings(int num, char *s, ...); - extern void trim_string(char *s); - extern int string_matches(const char *s1, const char *s2); - extern int hex_string_to_value(char *string, unsigned char *dst); - extern int is_string(const char *string, int len); - extern uint16_t get_random_uint16(void); - extern uint32_t get_random_uint32(void); - extern struct timeval timeval_diff(struct timeval begin, struct timeval end); - /* Replacement vsnprintf, snprintf if needed. */ --- 564,567 ---- *************** *** 820,824 **** /* Logging functions. */ ! extern void init_log(char *s); extern void close_log(void); extern void error_log(char *msg); --- 791,795 ---- /* Logging functions. */ ! extern void init_log(const char *s); extern void close_log(void); extern void error_log(char *msg); *************** *** 862,866 **** extern int interactive; - extern char *binname; extern char *workdirectory; extern int want_shutdown, want_hup; --- 833,836 ---- Index: dhcp-arp-discovery.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-arp-discovery.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-arp-discovery.c 19 May 2002 17:53:28 -0000 1.3 --- dhcp-arp-discovery.c 6 Jun 2002 23:59:00 -0000 1.4 *************** *** 24,27 **** --- 24,28 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* Accept a list of arguments. Will contain rawnet first, and Index: dhcp-arp.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-arp.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dhcp-arp.c 19 May 2002 16:24:37 -0000 1.8 --- dhcp-arp.c 6 Jun 2002 23:59:00 -0000 1.9 *************** *** 24,27 **** --- 24,28 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* constructor */ Index: dhcp-cache-entry.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-cache-entry.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-cache-entry.c 6 Jun 2002 03:27:25 -0000 1.5 --- dhcp-cache-entry.c 6 Jun 2002 23:59:00 -0000 1.6 *************** *** 28,31 **** --- 28,32 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* constructors. */ Index: dhcp-client-cache.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client-cache.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dhcp-client-cache.c 30 May 2002 06:44:05 -0000 1.8 --- dhcp-client-cache.c 6 Jun 2002 23:59:00 -0000 1.9 *************** *** 25,28 **** --- 25,29 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-files.h> #include <dhcp-convert.h> Index: dhcp-client-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client-conf.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dhcp-client-conf.c 29 May 2002 03:12:54 -0000 1.7 --- dhcp-client-conf.c 6 Jun 2002 23:59:00 -0000 1.8 *************** *** 24,27 **** --- 24,28 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-files.h> Index: dhcp-client-control.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client-control.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** dhcp-client-control.c 25 May 2002 20:55:36 -0000 1.18 --- dhcp-client-control.c 6 Jun 2002 23:59:00 -0000 1.19 *************** *** 23,26 **** --- 23,27 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-globconf.h> Index: dhcp-client-states.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client-states.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dhcp-client-states.c 30 May 2002 06:44:05 -0000 1.21 --- dhcp-client-states.c 6 Jun 2002 23:59:00 -0000 1.22 *************** *** 27,30 **** --- 27,31 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-sysconf.h> Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-client.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dhcp-client.c 5 Jun 2002 12:59:58 -0000 1.22 --- dhcp-client.c 6 Jun 2002 23:59:00 -0000 1.23 *************** *** 24,34 **** #include <dhcp-agent.h> #include <dhcp-globconf.h> #include <dhcp-files.h> int interactive = 1; /* by default we begin interactive (messages on stdout/stderr). */ - char *binname = "dhcpclient"; /* we need a name. */ char *work_dir = CLIENT_WORK_DIR; /* our default working directory */ /* read up on our global conf. */ static void read_global_conf(const char *interface) --- 24,38 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-globconf.h> #include <dhcp-files.h> int interactive = 1; /* by default we begin interactive (messages on stdout/stderr). */ char *work_dir = CLIENT_WORK_DIR; /* our default working directory */ + #if !defined(HAVE_PROGNAME) + const char *__progname; + #endif /* HAVE_PROGNAME */ + /* read up on our global conf. */ static void read_global_conf(const char *interface) *************** *** 247,250 **** --- 251,258 ---- int promiscious = 0; + #if !defined(HAVE_PROGNAME) + __progname = argv[0]; + #endif /* HAVE_PROGNAME */ + while((c = getopt(argc, argv, "gcdavi:m:kwh:l:")) != -1) { *************** *** 252,256 **** case 'v': ! printf("%s version: %s\n", argv[0], VERSION); exit(0); --- 260,264 ---- case 'v': ! printf("%s version: %s\n", getprogname(), VERSION); exit(0); Index: dhcp-com.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-com.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-com.c 19 May 2002 20:16:55 -0000 1.5 --- dhcp-com.c 6 Jun 2002 23:59:00 -0000 1.6 *************** *** 25,28 **** --- 25,29 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> static const unsigned char dhcp_magic_cookie[4] = { 99, 130, 83, 99 }; Index: dhcp-convert.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-convert.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** dhcp-convert.c 30 May 2002 06:44:05 -0000 1.12 --- dhcp-convert.c 6 Jun 2002 23:59:00 -0000 1.13 *************** *** 32,35 **** --- 32,36 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-convert.h> Index: dhcp-daemon.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-daemon.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-daemon.c 14 Feb 2002 10:43:34 -0000 1.5 --- dhcp-daemon.c 6 Jun 2002 23:59:00 -0000 1.6 *************** *** 26,29 **** --- 26,30 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* wrap for volatine integers, or proper sig_atomic_t types. */ *************** *** 225,229 **** /* initialize logging. */ ! init_log(binname); /* Now we're done. */ --- 226,230 ---- /* initialize logging. */ ! init_log(getprogname()); /* Now we're done. */ Index: dhcp-eth.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-eth.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-eth.c 1 Feb 2002 18:31:17 -0000 1.3 --- dhcp-eth.c 6 Jun 2002 23:59:00 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> eth_obj *eth_create(void) Index: dhcp-files.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-files.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dhcp-files.c 29 May 2002 03:12:54 -0000 1.9 --- dhcp-files.c 6 Jun 2002 23:59:00 -0000 1.10 *************** *** 25,28 **** --- 25,29 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-files.h> Index: dhcp-globconf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-globconf.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-globconf.c 30 May 2002 06:44:05 -0000 1.3 --- dhcp-globconf.c 6 Jun 2002 23:59:00 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-globconf.h> #include <dhcp-files.h> Index: dhcp-icmp-discovery.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-icmp-discovery.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dhcp-icmp-discovery.c 30 May 2002 06:44:05 -0000 1.10 --- dhcp-icmp-discovery.c 6 Jun 2002 23:59:00 -0000 1.11 *************** *** 28,31 **** --- 28,32 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-globconf.h> #include <dhcp-convert.h> Index: dhcp-icmp.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-icmp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dhcp-icmp.c 19 May 2002 17:53:28 -0000 1.6 --- dhcp-icmp.c 6 Jun 2002 23:59:00 -0000 1.7 *************** *** 24,27 **** --- 24,28 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> icmp_obj *icmp_create(void) Index: dhcp-interface.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-interface.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dhcp-interface.c 18 May 2002 18:10:09 -0000 1.14 --- dhcp-interface.c 6 Jun 2002 23:59:00 -0000 1.15 *************** *** 26,29 **** --- 26,30 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* Internal utilities */ Index: dhcp-ip.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-ip.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dhcp-ip.c 8 Feb 2002 01:37:29 -0000 1.4 --- dhcp-ip.c 6 Jun 2002 23:59:00 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> ip_obj *ip_create(void) Index: dhcp-list.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-list.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-list.c 30 Jan 2002 09:26:03 -0000 1.2 --- dhcp-list.c 6 Jun 2002 23:59:00 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> list_t *add_to_list(list_t *head, void *datum) Index: dhcp-log.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-log.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-log.c 8 Feb 2002 01:37:29 -0000 1.2 --- dhcp-log.c 6 Jun 2002 23:59:00 -0000 1.3 *************** *** 27,31 **** #include <dhcp-agent.h> ! void init_log(char *s) { openlog(s, LOG_OPT, LOG_FACILITY); --- 27,31 ---- #include <dhcp-agent.h> ! void init_log(const char *s) { openlog(s, LOG_OPT, LOG_FACILITY); Index: dhcp-net.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-net.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** dhcp-net.c 5 Jun 2002 13:08:36 -0000 1.24 --- dhcp-net.c 6 Jun 2002 23:59:00 -0000 1.25 *************** *** 62,65 **** --- 62,66 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-rtt.h> Index: dhcp-packet-build.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-packet-build.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-packet-build.c 19 May 2002 17:53:28 -0000 1.3 --- dhcp-packet-build.c 6 Jun 2002 23:59:00 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* constants we need. */ Index: dhcp-print.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-print.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dhcp-print.c 31 Jan 2002 12:37:24 -0000 1.4 --- dhcp-print.c 6 Jun 2002 23:59:00 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> /* Print the fixed header verbosely. Index: dhcp-route.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-route.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-route.c 19 May 2002 23:03:16 -0000 1.2 --- dhcp-route.c 6 Jun 2002 23:59:00 -0000 1.3 *************** *** 30,33 **** --- 30,34 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> int route_find(rawnet_t *net, ip_addr_t addr, eth_addr_t *dest_mac) Index: dhcp-rtt.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-rtt.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-rtt.c 30 May 2002 06:44:06 -0000 1.5 --- dhcp-rtt.c 6 Jun 2002 23:59:00 -0000 1.6 *************** *** 23,26 **** --- 23,27 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-rtt.h> Index: dhcp-sniff.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-sniff.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dhcp-sniff.c 3 Jun 2002 22:40:32 -0000 1.7 --- dhcp-sniff.c 6 Jun 2002 23:59:00 -0000 1.8 *************** *** 26,32 **** #include <dhcp-agent.h> int interactive = 1; ! char *binname = NULL; char *workdirectory = "."; --- 26,36 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> int interactive = 1; ! #if !defined(HAVE_PROGNAME) ! const char *__progname; ! #endif /* HAVE_PROGNAME */ ! char *workdirectory = "."; *************** *** 46,49 **** --- 50,57 ---- char filter_buff[GENERIC_BUFFSIZE]; + #if !defined(HAVE_PROGNAME) + __progname = argv[0]; + #endif /* HAVE_PROGNAME */ + while((c = getopt(argc, argv, "vi:")) != -1) { *************** *** 62,67 **** } } - - binname = argv[0]; /* Get port numbers from services db. */ --- 70,73 ---- Index: dhcp-sysconf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-sysconf.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** dhcp-sysconf.c 30 May 2002 06:44:06 -0000 1.13 --- dhcp-sysconf.c 6 Jun 2002 23:59:00 -0000 1.14 *************** *** 26,29 **** --- 26,30 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> #include <dhcp-files.h> #include <dhcp-convert.h> Index: dhcp-udp.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-udp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-udp.c 30 Jan 2002 16:06:46 -0000 1.2 --- dhcp-udp.c 6 Jun 2002 23:59:00 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> udp_obj *udp_create(void) Index: dhcp-util.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-util.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dhcp-util.c 29 May 2002 03:12:54 -0000 1.14 --- dhcp-util.c 6 Jun 2002 23:59:00 -0000 1.15 *************** *** 26,29 **** --- 26,30 ---- #include <dhcp-agent.h> + #include <dhcp-util.h> static char msgbuff[MSG_BUFFER_SIZE]; *************** *** 59,63 **** if(interactive == 1) { ! fprintf(stderr, "%s: error: %s", binname, msgbuff); fprintf(stderr,"\n"); } else --- 60,64 ---- if(interactive == 1) { ! fprintf(stderr, "%s: error: %s", getprogname(), msgbuff); fprintf(stderr,"\n"); } else *************** *** 80,84 **** if(interactive == 1) { ! fprintf(stderr, "%s: fatal error: %s", binname, msgbuff); fprintf(stderr,"\n"); } else --- 81,85 ---- if(interactive == 1) { ! fprintf(stderr, "%s: fatal error: %s", getprogname(), msgbuff); fprintf(stderr,"\n"); } else *************** *** 102,106 **** if(interactive == 1) { ! fprintf(stdout, "%s: %s", binname, msgbuff); fprintf(stdout,"\n"); } else --- 103,107 ---- if(interactive == 1) { ! fprintf(stdout, "%s: %s", getprogname(), msgbuff); fprintf(stdout,"\n"); } else *************** *** 123,127 **** if(interactive == 1) { ! fprintf(stdout, "%s warning: %s", binname, msgbuff); fprintf(stdout,"\n"); } else --- 124,128 ---- if(interactive == 1) { ! fprintf(stdout, "%s warning: %s", getprogname(), msgbuff); fprintf(stdout,"\n"); } else *************** *** 144,148 **** if(interactive == 1) { ! fprintf(stdout, "%s: debug: %s", binname, msgbuff); fprintf(stdout,"\n"); } else --- 145,149 ---- if(interactive == 1) { ! fprintf(stdout, "%s: debug: %s", getprogname(), msgbuff); fprintf(stdout,"\n"); } else *************** *** 458,459 **** --- 459,481 ---- return difference; } + + #if !defined(HAVE_GETPROGNAME) + const char *getprogname(void) + { + /* + * Compatibility looks like this: + * if getprogname this will not be. + * if __progname is available use it here. + * if __progname is not available set it in main source, + * and use it here. + */ + + /* FIXME: do the system provided getprogname() do this? */ + if(__progname[0] == '.' && __progname[1] == '/') + return (__progname + 2); + else + return(__progname); + + } + + #endif /* HAVE_GETPROGNAME */ |