autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [autoconf] AmigaOS fork()


From: Rüdiger Kuhlmann
Subject: Re: [autoconf] AmigaOS fork()
Date: Mon, 25 Jun 2001 21:19:23 +0200
User-agent: Mutt/1.3.18i

>--[Akim Demaille]--<address@hidden>
> Paul, this patch was sent later, and you did not comment it.

Does silence means it is refused? Come on, whoever has some authority on
this subject, say something, you aren't Dave Zaroski, are you?


> 2001-06-19 Rüdiger Kuhlmann <address@hidden>
> 
>       * acfunctions.m4: (AC_FUNC_FORK) Define ac_fork to fork, if it
>       works, and to vfork otherwise; similarly define ac_vfork.
>       * doc/autoconf.texi: Document changes to AC_FUNC_FORK.
> 
> Index: acfunctions.m4
> ===================================================================
> RCS file: /cvs/autoconf/acfunctions.m4,v
> retrieving revision 1.40
> diff -u -r1.40 acfunctions.m4
> --- acfunctions.m4    2001/06/18 19:36:10     1.40
> +++ acfunctions.m4    2001/06/18 23:39:43
> @@ -1428,7 +1428,7 @@
>  if test "x$ac_cv_func_fork_works" = xcross; then
>    case $host in
>      *-*-amigaos* | *-*-msdosdjgpp*)
> -      # Override, as these systems have only a dummy fork() stub
> +      # Override, as these systems only have a dummy fork() stub
>        ac_cv_func_fork_works=no
>        ;;
>      *)
> @@ -1448,11 +1448,16 @@
>  
>  if test "x$ac_cv_func_vfork_works" = xyes; then
>    AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define if `vfork' works.])
> +  AC_DEFINE(ac_vfork, vfork, [Define to `vfork' if it works, otherwise to 
> `fork'])
>  else
>    AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.])
> +  AC_DEFINE(ac_vfork, fork, [Define to `vfork' if it works, otherwise to 
> `fork'])
>  fi
>  if test "x$ac_cv_func_fork_works" = xyes; then
>    AC_DEFINE(HAVE_WORKING_FORK, 1, [Define if `fork' works.])
> +  AC_DEFINE(ac_fork, fork, [Define to `fork' if it works, otherwise to 
> `vfork'])
> +else
> +  AC_DEFINE(ac_fork, vfork, [Define to `fork' if it works, otherwise to 
> `vfork'])
>  fi
>  ])# AC_FUNC_FORK
>  
> Index: doc/autoconf.texi
> ===================================================================
> RCS file: /cvs/autoconf/doc/autoconf.texi,v
> retrieving revision 1.471
> diff -u -r1.471 autoconf.texi
> --- doc/autoconf.texi 2001/06/18 19:11:24     1.471
> +++ doc/autoconf.texi 2001/06/18 23:40:15
> @@ -3286,26 +3286,35 @@
>  checks whether @code{fork} is just a stub by trying to run it.
>  
>  If @file{vfork.h} is found, define @code{HAVE_VFORK_H}. If a working
> address@hidden is found, define @code{HAVE_WORKING_VFORK}. Otherwise,
> -define @code{vfork} to be @code{fork} for backward compatibility with
> -previous versions of @command{autoconf}. This macro checks for several known
> -errors in implementations of @code{vfork} and considers the system to not
> -have a working @code{vfork} if it detects any of them. It is not considered
> -to be an implementation error if a child's invocation of @code{signal}
> -modifies the parent's signal handler, since child processes rarely change
> -their signal handlers.
> address@hidden is found, define @code{HAVE_WORKING_VFORK}.
> +This macro checks for several known errors in implementations of
> address@hidden and considers the system to not have a working @code{vfork} if
> +it detects any of them. It is not considered to be an implementation error
> +if a child's invocation of @code{signal} modifies the parent's signal
> +handler, since child processes rarely change their signal handlers.
>  
> -Since this macro defines @code{vfork} only for backward compatibility with
> -previous versions of @command{autoconf} you're encouraged to define it
> -yourself in new code:
> +For backward compatibility with previous versions of @command{autoconf}, it
> +defines @code{vfork} to be @code{fork} if @code{vfork} does not work. As a
> +replacement, it defines @code{ac_fork} to @code{fork}, if it works, and to
> address@hidden otherwise, and @code{ac_vfork} to @code{vfork}, if it works,
> +and to @code{fork} otherwise. For a @code{vfork} use @code{ac_fork}, if you
> +want to avoid broken implementations of @code{vfork} at all costs, and
> address@hidden, if you prefer the performance increase @code{vfork} gives
> +you over @code{fork}. Feel free to redefine @code{vfork} to either symbol,
> +or do something like the following for @code{ac_vfork}:
>  @example
>  @group
> +#if defined(vfork)
> +# undef vfork
> +#endif
>  #if !HAVE_WORKING_VFORK
>  # define vfork fork
>  #endif
>  @end group
>  @end example
>  @end defmac
> +Beware that you need to undefine @code{vfork} as long as autoconf
> +defines it for backward compatibility.
>  
>  @defmac AC_FUNC_FSEEKO
>  @maindex FUNC_FSEEKO
> 
> 

-- 
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
                -- Mahatma Ghandi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]