head 1.5; access; symbols OPENPKG_E1_MP_HEAD:1.5 OPENPKG_E1_MP:1.5 OPENPKG_E1_MP_2_STABLE:1.5 OPENPKG_E1_FP:1.5 OPENPKG_2_STABLE_MP:1.5 OPENPKG_2_STABLE_20061018:1.5 OPENPKG_2_STABLE_20060622:1.5 OPENPKG_2_STABLE:1.5.0.12 OPENPKG_2_STABLE_BP:1.5 OPENPKG_2_5_RELEASE:1.5 OPENPKG_2_5_SOLID:1.5.0.10 OPENPKG_2_5_SOLID_BP:1.5 OPENPKG_2_4_RELEASE:1.5 OPENPKG_2_4_SOLID:1.5.0.8 OPENPKG_2_4_SOLID_BP:1.5 OPENPKG_CW_FP:1.5 OPENPKG_2_3_RELEASE:1.5 OPENPKG_2_3_SOLID:1.5.0.6 OPENPKG_2_3_SOLID_BP:1.5 OPENPKG_2_2_RELEASE:1.5 OPENPKG_2_2_SOLID:1.5.0.4 OPENPKG_2_2_SOLID_BP:1.5 OPENPKG_2_1_RELEASE:1.5 OPENPKG_2_1_SOLID:1.5.0.2 OPENPKG_2_1_SOLID_BP:1.5 OPENPKG_2_0_RELEASE:1.2 OPENPKG_2_0_SOLID:1.2.0.2 OPENPKG_2_0_SOLID_BP:1.2 OPENPKG_1_STABLE_MP:1.1; locks; strict; comment @# @; 1.5 date 2004.06.30.15.14.35; author ms; state Exp; branches; next 1.4; 1.4 date 2004.04.05.11.11.17; author tho; state Exp; branches; next 1.3; 1.3 date 2004.02.29.16.55.50; author rse; state dead; branches; next 1.2; 1.2 date 2003.08.18.08.01.08; author mlelstv; state Exp; branches; next 1.1; 1.1 date 2002.02.08.15.51.28; author rse; state Exp; branches; next ; desc @@ 1.5 log @package local versions of setenv(3) and unsetenv(3) source code for use by mapson buildconf on platforms not supplying the functions themselves @ text @Index: libhashcash/hashcash.h --- libhashcash/hashcash.h.orig 2004-04-05 12:52:56.000000000 +0200 +++ libhashcash/hashcash.h 2004-04-05 12:53:18.000000000 +0200 @@@@ -130,7 +130,7 @@@@ /* simple function calling hashcash_parse, hashcash_count for convenience */ int hashcash_check( const char* token, const char* resource, time_t now_time, - time_t validity_period, long grace_period, + time_t validity_period, time_t grace_period, int required_bits ); /* return how many tries per second the machine can do */ Index: configure.ac --- configure.ac.orig 2004-06-21 23:16:35.000000000 +0200 +++ configure.ac 2004-06-30 16:18:22.983805330 +0200 @@@@ -33,6 +33,24 @@@@ AC_LIBOBJ(libgetopt/getopt1) fi +dnl If the system is missing setenv(3), then use +dnl the version included in this distribution instead. +dnl +AC_CHECK_FUNC(setenv, have_setenv=yes, have_setenv=no) +if test "x$have_setenv" != "xyes" -o "x$have_setenv" != "xyes"; then + CPPFLAGS="$CPPFLAGS -Ilibsetenv" + AC_LIBOBJ(libsetenv/setenv) +fi + +dnl If the system is missing unsetenv(3), then use +dnl the version included in this distribution instead. +dnl +AC_CHECK_FUNC(unsetenv, have_unsetenv=yes, have_unsetenv=no) +if test "x$have_unsetenv" != "xyes" -o "x$have_unsetenv" != "xyes"; then + CPPFLAGS="$CPPFLAGS -Ilibunsetenv" + AC_LIBOBJ(libunsetenv/unsetenv) +fi + dnl Perform some incredibly experimental magic to guess installation dnl paths in an unexpectedly clever way. Henceforth evaluate the paths dnl right away so that we can guarantee _absolute_ paths for our Index: configure --- configure.orig 2004-06-30 16:26:59.696796000 +0200 +++ configure 2004-06-30 16:27:15.198222529 +0200 @@@@ -3537,6 +3537,222 @@@@ fi +echo "$as_me:$LINENO: checking for setenv" >&5 +echo $ECHO_N "checking for setenv... $ECHO_C" >&6 +if test "${ac_cv_func_setenv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define setenv to an innocuous variant, in case declares setenv. + For example, HP-UX 11i declares gettimeofday. */ +#define setenv innocuous_setenv + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char setenv (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef setenv + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char setenv (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_setenv) || defined (__stub___setenv) +choke me +#else +char (*f) () = setenv; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != setenv; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_setenv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_setenv=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_setenv" >&5 +echo "${ECHO_T}$ac_cv_func_setenv" >&6 +if test $ac_cv_func_setenv = yes; then + have_setenv=yes +else + have_setenv=no +fi + +if test "x$have_setenv" != "xyes" -o "x$have_setenv" != "xyes"; then + CPPFLAGS="$CPPFLAGS -Ilibsetenv" + case $LIBOBJS in + "libsetenv/setenv.$ac_objext" | \ + *" libsetenv/setenv.$ac_objext" | \ + "libsetenv/setenv.$ac_objext "* | \ + *" libsetenv/setenv.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS libsetenv/setenv.$ac_objext" ;; +esac + +fi + +echo "$as_me:$LINENO: checking for unsetenv" >&5 +echo $ECHO_N "checking for unsetenv... $ECHO_C" >&6 +if test "${ac_cv_func_unsetenv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define unsetenv to an innocuous variant, in case declares unsetenv. + For example, HP-UX 11i declares gettimeofday. */ +#define unsetenv innocuous_unsetenv + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char unsetenv (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef unsetenv + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char unsetenv (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_unsetenv) || defined (__stub___unsetenv) +choke me +#else +char (*f) () = unsetenv; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != unsetenv; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_unsetenv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_unsetenv=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_unsetenv" >&5 +echo "${ECHO_T}$ac_cv_func_unsetenv" >&6 +if test $ac_cv_func_unsetenv = yes; then + have_unsetenv=yes +else + have_unsetenv=no +fi + +if test "x$have_unsetenv" != "xyes" -o "x$have_unsetenv" != "xyes"; then + CPPFLAGS="$CPPFLAGS -Ilibunsetenv" + case $LIBOBJS in + "libunsetenv/unsetenv.$ac_objext" | \ + *" libunsetenv/unsetenv.$ac_objext" | \ + "libunsetenv/unsetenv.$ac_objext "* | \ + *" libunsetenv/unsetenv.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS libunsetenv/unsetenv.$ac_objext" ;; +esac + +fi + if test "$prefix" = "NONE"; then prefix=/usr/local if test "$exec_prefix" = "NONE"; then Index: Makefile.in --- Makefile.in.orig 2004-06-21 23:18:16.000000000 +0200 +++ Makefile.in 2004-06-30 16:55:48.072234546 +0200 @@@@ -48,7 +48,7 @@@@ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL TODO compile \ depcomp install-sh libgetopt/getopt.c libgetopt/getopt1.c \ - missing + libsetenv/setenv.c libunsetenv/unsetenv.c missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@@@ -79,6 +79,8 @@@@ am__depfiles_maybe = depfiles @@AMDEP_TRUE@@DEP_FILES = $(DEPDIR)/libgetopt/getopt.Po \ @@AMDEP_TRUE@@ $(DEPDIR)/libgetopt/getopt1.Po \ +@@AMDEP_TRUE@@ $(DEPDIR)/libsetenv/setenv.Po \ +@@AMDEP_TRUE@@ $(DEPDIR)/libunsetenv/unsetenv.Po \ @@AMDEP_TRUE@@ ./$(DEPDIR)/mapson-accept-confirmation.Po \ @@AMDEP_TRUE@@ ./$(DEPDIR)/mapson-address-db.Po \ @@AMDEP_TRUE@@ ./$(DEPDIR)/mapson-config.Po \ @@@@ -324,6 +326,8 @@@@ @@AMDEP_TRUE@@@@am__include@@ @@am__quote@@$(DEPDIR)/libgetopt/getopt.Po@@am__quote@@ @@AMDEP_TRUE@@@@am__include@@ @@am__quote@@$(DEPDIR)/libgetopt/getopt1.Po@@am__quote@@ +@@AMDEP_TRUE@@@@am__include@@ @@am__quote@@$(DEPDIR)/libsetenv/setenv.Po@@am__quote@@ +@@AMDEP_TRUE@@@@am__include@@ @@am__quote@@$(DEPDIR)/libunsetenv/unsetenv.Po@@am__quote@@ @@AMDEP_TRUE@@@@am__include@@ @@am__quote@@./$(DEPDIR)/mapson-accept-confirmation.Po@@am__quote@@ @@AMDEP_TRUE@@@@am__include@@ @@am__quote@@./$(DEPDIR)/mapson-address-db.Po@@am__quote@@ @@AMDEP_TRUE@@@@am__include@@ @@am__quote@@./$(DEPDIR)/mapson-config.Po@@am__quote@@ @@@@ -1039,7 +1043,10 @@@@ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(DEPDIR)/libgetopt ./$(DEPDIR) + -rm -rf $(DEPDIR)/libgetopt + -rm -rf $(DEPDIR)/libsetenv + -rm -rf $(DEPDIR)/libunsetenv + -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@@@ -1067,7 +1074,10 @@@@ maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf $(DEPDIR)/libgetopt ./$(DEPDIR) + -rm -rf $(DEPDIR)/libgetopt + -rm -rf $(DEPDIR)/libsetenv + -rm -rf $(DEPDIR)/libunsetenv + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @ 1.4 log @Fixed declaration in hashcash.h @ text @d1 1 d13 308 @ 1.3 log @upgrading package: mapson 2.4 -> 3.0b3 @ text @d1 4 a4 4 --- libgetopt/getopt.h.dist 2003-08-18 09:53:19.000000000 +0200 +++ libgetopt/getopt.h 2003-08-18 09:53:46.000000000 +0200 @@@@ -138,13 +138,11 @@@@ `getopt'. */ d6 4 a9 10 #if (defined __STDC__ && __STDC__) || defined __cplusplus -# ifdef __GNU_LIBRARY__ +# if defined(__GNU_LIBRARY__) || defined(__FreeBSD__) /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); -# else /* not __GNU_LIBRARY__ */ -extern int getopt (); # endif /* __GNU_LIBRARY__ */ d11 1 a11 1 # ifndef __need_getopt @ 1.2 log @avoid prototype clashes @ text @@ 1.1 log @New package: mapson 2.0b2 @ text @d1 3 a3 3 --- libgetopt/getopt.h.orig Fri Feb 8 16:40:49 2002 +++ libgetopt/getopt.h Fri Feb 8 16:41:15 2002 @@@@ -138,7 +138,7 @@@@ d12 6 @