summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-05-10 03:15:07 +0000
committerPaul Smith <psmith@gnu.org>2002-05-10 03:15:07 +0000
commit9052b52dfc69d9567e2e664b0f096bfae535bcad (patch)
tree39e24d1a4d38996e5ffc42601d98d5b47289ee3f /main.c
parent5dedf7be638113e65df4bab535386db212a0e812 (diff)
downloadgunmake-9052b52dfc69d9567e2e664b0f096bfae535bcad.tar.gz
Fix Debian bug #144306: pass target-specific variables into the environment
properly. Fix configure: allow cross-compilation; fix getloadavg (still needs _lots_ of work!) Let $(call ...) functions to be self-referencing. Lets us do transitive closures, for example.
Diffstat (limited to 'main.c')
-rw-r--r--main.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/main.c b/main.c
index 251a17d..790bc43 100644
--- a/main.c
+++ b/main.c
@@ -443,19 +443,21 @@ int clock_skew_detected;
#ifdef POSIX
sigset_t fatal_signal_set;
#else
-#ifdef HAVE_SIGSETMASK
+# ifdef HAVE_SIGSETMASK
int fatal_signal_mask;
-#endif
+# endif
#endif
#if !defined HAVE_BSD_SIGNAL && !defined bsd_signal
# if !defined HAVE_SIGACTION
# define bsd_signal signal
# else
-static RETSIGTYPE
-(*bsd_signal) PARAMS ((int)) (sig, func)
+typedef RETSIGTYPE (*bsd_signal_ret_t) ();
+
+static bsd_signal_ret_t
+bsd_signal (sig, func)
int sig;
- RETSIGTYPE (*func) PARAMS ((int));
+ bsd_signal_ret_t func;
{
struct sigaction act, oact;
act.sa_handler = func;
@@ -902,15 +904,15 @@ int main (int argc, char ** argv)
/* Make sure stdout is line-buffered. */
-#ifdef HAVE_SETLINEBUF
- setlinebuf (stdout);
-#else
-#ifndef SETVBUF_REVERSED
+#ifdef HAVE_SETVBUF
+# ifdef SETVBUF_REVERSED
setvbuf (stdout, (char *) 0, _IOLBF, BUFSIZ);
-#else /* setvbuf not reversed. */
+# else /* setvbuf not reversed. */
/* Some buggy systems lose if we pass 0 instead of allocating ourselves. */
setvbuf (stdout, _IOLBF, xmalloc (BUFSIZ), BUFSIZ);
-#endif /* setvbuf reversed. */
+# endif /* setvbuf reversed. */
+#elif HAVE_SETLINEBUF
+ setlinebuf (stdout);
#endif /* setlinebuf missing. */
/* Figure out where this program lives. */