[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Old patches from Red Hat
From: |
Quentin Spencer |
Subject: |
Old patches from Red Hat |
Date: |
Thu, 28 Apr 2005 14:49:32 -0500 |
User-agent: |
Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) |
Since octave is being removed from Fedora for the upcoming release, I'm
working on importing it into Fedora Extras. They are currently packaging
2.1.57 with some old patches, and I thought I should at least look at
the patches before I update it to a more recent version and dump the
patches. One originated at 2.1.57 and is related to some signbit
problems that I remember being reported on the list. The second patch
seems unnecessary--it was originally written before the RH maintainers
figured out that octave depended on texinfo. I'm attaching the patches.
Has the signbit problem been resolved? If we assume that texinfo is
installed, is the help patch useful in any way?
thanks,
Quentin
--- octave-2.1.57/liboctave/lo-ieee.h.morn 2005-02-15 12:48:46.000000000
+0100
+++ octave-2.1.57/liboctave/lo-ieee.h 2005-02-03 11:08:44.000000000 +0100
@@ -91,7 +91,7 @@
#undef _UNSET_GNU_SOURCE
#undef _GNU_SOURCE
#endif
-#ifndef signbit
+#if (!defined signbit) && (!defined __cplusplus)
#error "No signbit definition?!"
#else
#define lo_ieee_signbit(x) signbit(x)
diff -ur octave-2.1.57/liboctave/lo-ieee.h octave-2.1.57-lhh/liboctave/lo-ieee.h
--- octave-2.1.57/liboctave/lo-ieee.h 2003-09-05 12:55:42.000000000 -0400
+++ octave-2.1.57-lhh/liboctave/lo-ieee.h 2004-06-24 13:31:54.027006788
-0400
@@ -82,7 +81,20 @@
#elif defined (HAVE_COPYSIGN)
#define lo_ieee_signbit(x) (x < 0 || copysign (1.0, x) < 0)
#else
-#define lo_ieee_signbit(x) 0
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#define _UNSET_GNU_SOURCE 1
+#endif
+#include <math.h>
+#ifdef _UNSET_GNU_SOURCE
+#undef _UNSET_GNU_SOURCE
+#undef _GNU_SOURCE
+#endif
+#ifndef signbit
+#error "No signbit definition?!"
+#else
+#define lo_ieee_signbit(x) signbit(x)
+#endif
#endif
#ifdef __cplusplus
diff -ur octave-2.1.50/src/help.cc octave-2.1.50-lhh/src/help.cc
--- octave-2.1.50/src/help.cc 2003-01-02 17:55:57.000000000 -0500
+++ octave-2.1.50-lhh/src/help.cc 2003-08-01 17:08:26.000000000 -0400
@@ -502,6 +502,22 @@
}
static int
+system_quiet(const char *string)
+{
+ int pid, rv;
+ pid = fork();
+ if (pid) {
+ while (wait4(pid, &rv, 0, NULL) == -1);
+ return rv;
+ } else {
+ close(STDERR_FILENO);
+ rv = execlp("/bin/sh","/bin/sh","-c",string,NULL);
+ /* notreached */
+ exit(rv);
+ }
+}
+
+static int
try_info (const std::string& nm)
{
int status = 0;
@@ -527,7 +543,7 @@
volatile octave_interrupt_handler old_interrupt_handler
= octave_ignore_interrupts ();
- status = system (OSSTREAM_C_STR (cmd_buf));
+ status = system_quiet (OSSTREAM_C_STR (cmd_buf));
OSSTREAM_FREEZE (cmd_buf);