changeset 6123:8d285942fc3c

[project @ 2006-10-28 14:09:20 by jwe]
author jwe
date Sat, 28 Oct 2006 14:11:18 +0000
parents f3322fd3c9bb
children 58f46c6f0d51
files ChangeLog libcruft/ChangeLog libcruft/misc/quit.h liboctave/ChangeLog liboctave/lo-sysdep.cc liboctave/lo-sysdep.h liboctave/oct-shlib.cc liboctave/oct-syscalls.cc src/ChangeLog src/mappers.cc
diffstat 10 files changed, 53 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Oct 28 13:56:55 2006 +0000
+++ b/ChangeLog	Sat Oct 28 14:11:18 2006 +0000
@@ -1,4 +1,4 @@
-2006-10-27  Michael Goffioul  <michael.goffioul@swing.be>
+2006-10-28  Michael Goffioul  <michael.goffioul@swing.be>
 
 	* configure.in (AH_BOTTOM): If using MSVC, define __WIN32__ before
 	other #ifdefs that use it.
--- a/libcruft/ChangeLog	Sat Oct 28 13:56:55 2006 +0000
+++ b/libcruft/ChangeLog	Sat Oct 28 14:11:18 2006 +0000
@@ -1,3 +1,7 @@
+2006-10-28  Michael Goffioul  <michael.goffioul@swing.be>
+
+	* misc/quit.h: Undefine min and max after including windows.h.
+
 2006-10-27  John W. Eaton  <jwe@octave.org>
 
 	* misc/oct-dlldefs.h: New file.
--- a/libcruft/misc/quit.h	Sat Oct 28 13:56:55 2006 +0000
+++ b/libcruft/misc/quit.h	Sat Oct 28 14:11:18 2006 +0000
@@ -37,6 +37,8 @@
 #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
 
 #include <windows.h>
+#undef min
+#undef max
 
 CRUFT_API extern void w32_sigint_init (void);   /* setup */
 CRUFT_API extern void w32_raise_final (void);   /* tear down */
--- a/liboctave/ChangeLog	Sat Oct 28 13:56:55 2006 +0000
+++ b/liboctave/ChangeLog	Sat Oct 28 14:11:18 2006 +0000
@@ -1,3 +1,10 @@
+2006-10-28  Michael Goffioul  <michael.goffioul@swing.be>
+
+	* oct-shlib.cc: Undefine min and max after including windows.h.
+	* oct-syscalls.cc (syscalls::pipe (int *)): Avoid infinite recursion.
+	* lo-sysdep.h: Move opendir, readdir, etc. decls here from
+	lo-sysdep.cc.
+
 2006-10-27  John W. Eaton  <jwe@octave.org>
 
 	* oct-time.cc [! HAVE_STRFTIME]: Declare strftime.
--- a/liboctave/lo-sysdep.cc	Sat Oct 28 13:56:55 2006 +0000
+++ b/liboctave/lo-sysdep.cc	Sat Oct 28 14:11:18 2006 +0000
@@ -38,6 +38,7 @@
 #include "file-ops.h"
 #include "lo-error.h"
 #include "pathlen.h"
+#include "lo-sysdep.h"
 
 std::string
 octave_getcwd (void)
@@ -92,7 +93,7 @@
 #endif
 }
 
-#ifdef _MSC_VER
+#if defined (_MSC_VER)
 
 // FIXME -- it would probably be better to adapt the versions of
 // opendir, readdir, and closedir from Emacs as they appear to be more
@@ -101,19 +102,14 @@
 
 #include <windows.h>
 
-struct direct
-{
-  char *d_name;
-};
-
-typedef struct
+struct __DIR
 {
   HANDLE hnd;
   WIN32_FIND_DATA fd;
   int dirty;
   struct direct d;
-  const char* current;
-} DIR;
+  const char *current;
+};
 
 DIR *
 opendir (const char *name)
@@ -132,7 +128,7 @@
 }
 
 void
-rewinddir (DIR* d)
+rewinddir (DIR *d)
 {
   if (d->hnd != INVALID_HANDLE_VALUE)
     FindClose (d->hnd);
--- a/liboctave/lo-sysdep.h	Sat Oct 28 13:56:55 2006 +0000
+++ b/liboctave/lo-sysdep.h	Sat Oct 28 14:11:18 2006 +0000
@@ -36,6 +36,27 @@
 extern int gethostname (char *, int);
 #endif
 
+#if defined (_MSC_VER)
+
+// FIXME -- it would probably be better to adapt the versions of
+// opendir, readdir, and closedir from Emacs as they appear to be more
+// complete implementations.  We can probably get along without
+// rewinddir.
+
+struct direct
+{
+  char *d_name;
+};
+
+typedef struct __DIR DIR;
+
+extern DIR* opendir (const char *name);
+extern void rewinddir (DIR *d);
+extern void closedir (DIR *d);
+extern struct direct *readdir (DIR *d);
+
+#endif
+
 #endif
 
 /*
--- a/liboctave/oct-shlib.cc	Sat Oct 28 13:56:55 2006 +0000
+++ b/liboctave/oct-shlib.cc	Sat Oct 28 14:11:18 2006 +0000
@@ -49,6 +49,8 @@
 #include <dl.h>
 #elif defined (HAVE_LOADLIBRARY_API)
 #include <windows.h>
+#undef min
+#undef max
 #endif
 }
 
--- a/liboctave/oct-syscalls.cc	Sat Oct 28 13:56:55 2006 +0000
+++ b/liboctave/oct-syscalls.cc	Sat Oct 28 14:11:18 2006 +0000
@@ -273,7 +273,7 @@
 octave_syscalls::pipe (int *fildes)
 {
   std::string msg;
-  return pipe (fildes);
+  return pipe (fildes, msg);
 }
 
 int
--- a/src/ChangeLog	Sat Oct 28 13:56:55 2006 +0000
+++ b/src/ChangeLog	Sat Oct 28 14:11:18 2006 +0000
@@ -1,3 +1,8 @@
+2006-10-28  Michael Goffioul  <michael.goffioul@swing.be>
+
+	* mappers.cc (install_mapper_functions): Undefine toascii before
+	the DEFUN_MAPPER for it.
+
 2006-10-27  John W. Eaton  <jwe@octave.org>
 
 	* mexproto.h: Include oct-dlldefs.h.
--- a/src/mappers.cc	Sat Oct 28 13:56:55 2006 +0000
+++ b/src/mappers.cc	Sat Oct 28 14:11:18 2006 +0000
@@ -610,6 +610,10 @@
 Compute hyperbolic tangent of each element of @var{x}.\n\
 @end deftypefn");
 
+#ifdef toascii
+#undef toascii
+#endif
+
   DEFUN_MAPPER (toascii, xtoascii, 0, 0, 0, 0, 0, 0.0, 0.0, 1, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} toascii (@var{s})\n\