From: Akim Demaille Date: Tue, 8 Feb 2000 09:45:21 +0000 (+0000) Subject: * acgeneral.m4: Formatting changes. X-Git-Tag: autoconf-2.50~1217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c809277bf90c5847dd4889fb074a82d7ed960b7b;p=thirdparty%2Fautoconf.git * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 3e41b454f..98113edfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-02-08 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + 2000-02-08 Akim Demaille Use the style we promote. diff --git a/acgeneral.m4 b/acgeneral.m4 index 059796317..9433a1677 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -359,9 +359,9 @@ define(AC_TR_SH, -## --------------------------- ## -## Implementing Autoconf loops ## -## --------------------------- ## +## ----------------------------- ## +## Implementing Autoconf loops. ## +## ----------------------------- ## # AC_FOREACH(VARIABLE, LIST, EXPRESSION) @@ -394,9 +394,9 @@ AC_DEFUN(AC_SPECIALIZE, [indir([$1], m4_shift($@))])]) -## --------------------------------- ## -## Helping macros to display strings ## -## --------------------------------- ## +## ----------------------------------- ## +## Helping macros to display strings. ## +## ----------------------------------- ## # AC_HELP_STRING(LHS, RHS[, COLUMN]) @@ -448,9 +448,11 @@ popdef([AC_Prefix_Format])dnl popdef([AC_Prefix])dnl ]) -## -------------- ## -## Initialization ## -## -------------- ## + + +## ---------------- ## +## Initialization. ## +## ---------------- ## # AC_INIT_NOTICE @@ -3320,8 +3322,9 @@ ifset([AC_LIST_COMMANDS], [AC_OUTPUT_COMMANDS_COMMANDS()])dnl cat >>$CONFIG_STATUS <>8); - } + pid = getpid (); + pg1 = getpgrp (0); + pg2 = getpgrp (); + pg3 = getpgrp (pid); + pg4 = getpgrp (1); + + /* If all of these values are the same, it's pretty sure that we're + on a system that ignores getpgrp's first argument. */ + if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) + exit (0); + + child = fork (); + if (child < 0) + exit(1); + else if (child == 0) + { + np = getpid (); + /* If this is Sys V, this will not work; pgrp will be set to np + because setpgrp just changes a pgrp to be the same as the + pid. */ + setpgrp (np, pg1); + ng = getpgrp (0); /* Same result for Sys V and BSD */ + if (ng == pg1) + exit (1); + else + exit (0); + } + else + { + wait (&s); + exit (s>>8); + } }], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no, AC_MSG_ERROR(cannot check getpgrp if cross compiling)) ]) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 059796317..9433a1677 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -359,9 +359,9 @@ define(AC_TR_SH, -## --------------------------- ## -## Implementing Autoconf loops ## -## --------------------------- ## +## ----------------------------- ## +## Implementing Autoconf loops. ## +## ----------------------------- ## # AC_FOREACH(VARIABLE, LIST, EXPRESSION) @@ -394,9 +394,9 @@ AC_DEFUN(AC_SPECIALIZE, [indir([$1], m4_shift($@))])]) -## --------------------------------- ## -## Helping macros to display strings ## -## --------------------------------- ## +## ----------------------------------- ## +## Helping macros to display strings. ## +## ----------------------------------- ## # AC_HELP_STRING(LHS, RHS[, COLUMN]) @@ -448,9 +448,11 @@ popdef([AC_Prefix_Format])dnl popdef([AC_Prefix])dnl ]) -## -------------- ## -## Initialization ## -## -------------- ## + + +## ---------------- ## +## Initialization. ## +## ---------------- ## # AC_INIT_NOTICE @@ -3320,8 +3322,9 @@ ifset([AC_LIST_COMMANDS], [AC_OUTPUT_COMMANDS_COMMANDS()])dnl cat >>$CONFIG_STATUS <>8); - } + pid = getpid (); + pg1 = getpgrp (0); + pg2 = getpgrp (); + pg3 = getpgrp (pid); + pg4 = getpgrp (1); + + /* If all of these values are the same, it's pretty sure that we're + on a system that ignores getpgrp's first argument. */ + if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) + exit (0); + + child = fork (); + if (child < 0) + exit(1); + else if (child == 0) + { + np = getpid (); + /* If this is Sys V, this will not work; pgrp will be set to np + because setpgrp just changes a pgrp to be the same as the + pid. */ + setpgrp (np, pg1); + ng = getpgrp (0); /* Same result for Sys V and BSD */ + if (ng == pg1) + exit (1); + else + exit (0); + } + else + { + wait (&s); + exit (s>>8); + } }], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no, AC_MSG_ERROR(cannot check getpgrp if cross compiling)) ])