autoconf
[Top][All Lists]
Advanced

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

Re: [autoconf] AmigaOS fork()


From: Akim Demaille
Subject: Re: [autoconf] AmigaOS fork()
Date: 31 May 2001 17:58:54 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (GTK)

Thanks for your prompt reply!


| No. This would be wrong. Then I'd better #define fork to be vfork. But vfork
| is not necessarily a replacement for fork. But for the tests at hand, it is.
| 
| Another idea would be to add
| 
| #if HAVE_WORKING_FORK
| #define forkvfork fork
| #else
| #if HAVE_WORKING_VFORK
| #define forkvfork vfork
| #else
| #error Neither fork nor vfork available.
| #endif
| #endif
| 
| to confdefs.h and replace fork by forkvfork where appropriate.  forkvfork in
| the sense of prefer fork, but replace by vfork. Comments about that?

Hm, I probably had not very well understood what was going on.  I
don't know enough about vfork and fork to speak intelligently here,
but I seem to understand that using AC_REPLACE_FUNCS would be better
suited then, no?  I mean, from the user point of view, not for the
tests themselves.

For the tests themselves, I don't know what to do.  I'd need some
knowledgeable experienced input from others :).  (FYI, Autoconf
considers #error as not usable.  We might be wrong, we don't know, but
that's an assumption to respect.   Hm, I'll embed a test in the test
suite.  BTW, there is a test for negated char classes in the test
suite, and up to now it never fails: [!a-z] seems portable!).

| 2001-05-31 Rüdiger Kuhlmann <address@hidden>
| 
|         * acfunctions.m4: (AC_FUNC_FORK) New, check whether fork() isn't just
|           a stub and define HAVE_WORKING_FUNC if it works.
|           (AC_FUNC_GETPGRP, AC_FUNC_WAIT3) Use AC_FUNC_FORK and #define fork
|           to vfork if necessary.
|           (AC_FUN_VFORK) Similarly define HAVE_WORKING_VFORK.

s/FUN/FUNC/.

|         * acspecific.m4: (AC_SYS_RESTARTABLE_SYSCALLS) dito.

Isn't it ditto?


|  # AC_FUNC_VFORK
|  # -------------
|  AC_DEFUN([AC_FUNC_VFORK],
| @@ -1547,6 +1587,8 @@
|  ac_cv_func_vfork_works=$ac_cv_func_vfork])])
|  if test "x$ac_cv_func_vfork_works" = xno; then
|    AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.])
| +else
| +  AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define if `vfork' works.])
|  fi
|  ])# AC_FUNC_VFORK

Independent comment: personally, I don't like this `feature' of
Autoconf.  Maybe in the future we should move this #define vfork fork
under the responsability of the user, say in system.h.

BTW, note that it means that here, this define is copied in
confdefs.h.

Hm...  Do we really want _two_ macros here?  Again, I might be too
novice to fully understand the fork picture, but wouldn't it make more
sense to have a single macro checking for both and making the right
choice?  This would also address the issue you mentioned above.


| address@hidden AC_FUNC_FORK
| address@hidden FUNC_FORK
| address@hidden HAVE_WORKING_FORK
| +If a working @code{fork} is not found, define @code{HAVE_WORKING_FORK}. This
| +macro only checks whether @code{fork} ist just a stub.

Are you German?  :)  s/ist/is/.


Thanks a lot for your patience!



reply via email to

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