This commit was generated by cvs2svn to compensate for changes in r1080,
authortomo <tomo>
Thu, 6 Jan 2000 07:28:11 +0000 (07:28 +0000)
committertomo <tomo>
Thu, 6 Jan 2000 07:28:11 +0000 (07:28 +0000)
which included commits to RCS files with non-trunk default branches.

31 files changed:
PROBLEMS
configure.usage
etc/NEWS
lib-src/ChangeLog
lib-src/etags.c
lisp/about.el
lisp/font-lock.el
lwlib/ChangeLog
lwlib/lwlib-Xlw.c
man/ChangeLog
man/xemacs/startup.texi
nt/ChangeLog
nt/xemacs.mak
src/callproc.c
src/elhash.c
src/events.h
src/fileio.c
src/input-method-xlib.c
src/nas.c
src/nt.c
src/ntproc.c
src/process-nt.c
src/s/windowsnt.h
src/sound.c
src/sysdep.c
src/sysdep.h
src/sysdir.h
src/sysfile.h
src/systty.h
tests/ChangeLog
version.sh

index 42225f4..db106ae 100644 (file)
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -41,8 +41,8 @@ crashes in the function skip-syntax-backward.
 There have been reports of egcs-1.1 not compiling XEmacs correctly on
 Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K.
 
-*** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using
-`-fno-strength-reduce'.
+*** Don't use -O2 or -O3 with Cygwin 1.0, CodeFusion-99070 or gcc 2.7.2 on x86
+without also using `-fno-strength-reduce'.
 
 gcc will generate incorrect code otherwise.  This bug is present in at
 least 2.6.x and 2.7.[0-2].  This bug has been fixed in GCC 2.7.2.1 and
@@ -50,6 +50,25 @@ later.  This bug is O/S independent, but is limited to x86 architectures.
 
 This problem is known to be fixed in egcs (or pgcc) 1.0 or later.
 
+Unfortunately, later releases of Cygnus-released compilers (not the
+Net-released ones) have a bug with the same `problem signature'.
+
+If you're lucky, you'll get an error while compiling that looks like:
+
+event-stream.c:3189: internal error--unrecognizable insn:
+(insn 256 14 15 (set (reg/v:SI 24)
+        (minus:SI (reg/v:SI 25)
+            (const_int 2))) -1 (insn_list 11 (nil))
+    (nil))
+    0       0 [main]
+
+If you're unlucky, your code will simply execute incorrectly.
+
+*** Don't use gcc-2.95.2 with -mcpu=ultrasparc on Solaris 2.6.
+
+gcc will assume a 64-bit operating system, even though you've
+merely told it to assume a 64-bit instruction set.
+
 *** Don't use -O2 with gcc 2.7.2 under Intel architectures without also
 using `-fno-caller-saves'.
 
index 1f1b77e..12a020f 100644 (file)
@@ -124,8 +124,10 @@ Additional features:
 --with-sound=TYPE,[TYPE],... Compile with native sound support.
                        Valid types are `native', `nas' and `esd'.
                        Prefix a type with 'no' to disable.
-                       The first option can be `none' or `all' to change
-                       the default which is: native,esd
+                       The first option can be `none' or `all'.
+                       `none' is a synonym for `nonative,nonas,noesd'.
+                       `all' is a synonym for native,nas,esd or `all'.
+                       The default is to autodetect all sound support.
 --native-sound-lib=LIB  Native sound support library.  Needed on Suns
                         with --with-sound=both because both sound libraries
                         are called libaudio.
index 9289e88..3dcba1e 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -187,9 +187,9 @@ for PSWrap.
 Olivier Galibert has written a portable dumper for XEmacs, based on
 initial work by Kyle Jones.  Normally, XEmacs C sources link into an
 executable called `temacs', which loads the Lisp code and "unexecs"
-into a proper `xemacs' executable.  The unexec() process is unreliable
-and makes XEmacs hard to port to new operating systems, or even to new
-releases of old systems.
+into a proper `xemacs' executable.  The unexec() process is hard to
+implement correctly and makes XEmacs very hard to port to new
+operating systems, or even to new releases of old systems.
 
 A portable dumper is a different approach to dumping: instead of
 dumping full-fledged executable, it only dumps out the initialized
@@ -248,8 +248,8 @@ are implemented as native window-system widgets.  Thus you can embed
 buttons, scrollbars, combo boxes, edit fields and progress gauges in a
 buffer.  As a side effect subwindow support now works once again.
 
-All of this is still very experimental.  This support is currently
-only available under MS-Windows.  (#### Is this true?)
+All of this is still very experimental.  This feature is currently
+more complete under MS-Windows.
 
 ** user-init-directory is now an absolute, unexpanded path.
 Previously, `user-init-directory' used to be relative to
index 9ddbcbc..ae4dbc1 100644 (file)
@@ -1,3 +1,11 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.24 is released.
+
+1999-12-13  Martin Buchholz  <martin@xemacs.org>
+
+       * etags.c: Fix warning: `_GNU_SOURCE' redefined.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.23 is released.
index 5f2223a..35a161e 100644 (file)
@@ -37,9 +37,6 @@ char pot_etags_version[] = "@(#) pot revision number is 13.33";
 #define        TRUE    1
 #define        FALSE   0
 
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE           /* enables some compiler checks on GNU */
-#endif
 #ifndef DEBUG
 # define DEBUG FALSE
 #endif
@@ -53,6 +50,10 @@ char pot_etags_version[] = "@(#) pot revision number is 13.33";
 # define LONG_OPTIONS          /* accept long options */
 #endif /* HAVE_CONFIG_H */
 
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1         /* enables some compiler checks on GNU */
+#endif
+
 #ifdef MSDOS
 # include <fcntl.h>
 # include <sys/param.h>
index 0adcec7..4448a0d 100644 (file)
@@ -1313,7 +1313,7 @@ above.  We couldn't have done it without them.\n\n"
        (print-short "Jonathan Edwards" "edwards@intranet.com")
        (print-short "Eric Eide" "eeide@asylum.cs.utah.edu")
        (print-short "EKR" "ekr@terisa.com")
-       (print-short "Gunnar Evermann" "Gunnar.Evermann@nats.informatik.uni-hamburg.de")
+       (print-short "Gunnar Evermann" "ge204@eng.cam.ac.uk")
        (print-short "Oscar Figueiredo" "Oscar.Figueiredo@di.epfl.ch")
        (print-short "David Fletcher" "frodo@tsunami.com")
        (print-short "Paul Flinders" "ptf@delcam.co.uk")
index 928ab0a..be8df46 100644 (file)
@@ -611,7 +611,11 @@ This is normally set via `font-lock-defaults'.")
   '((((class color) (background dark)) (:foreground "light coral"))
     (((class color) (background light)) (:foreground "green4"))
     (t (:bold t)))
-  "Font Lock mode face used to highlight documentation strings."
+  "Font Lock mode face used to highlight documentation strings.
+This is currently supported only in Lisp-like modes, which are those
+with \"lisp\" or \"scheme\" in their name.  You can explicitly make
+a mode Lisp-like by putting a non-nil `font-lock-lisp-like' property
+on the major mode's symbol."
   :group 'font-lock-faces)
 
 (defface font-lock-keyword-face
index 13b953d..545f2c0 100644 (file)
@@ -1,3 +1,30 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.24 is released.
+
+1999-12-14  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c (TabsResize): reset need_layout so that we don't go
+       into infloop death.
+
+1999-12-14  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c (TabsSetValues): re-allocate GCs if font has changed.
+
+1999-12-13  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c (TabsResize): We need to expose the tabs after
+       clearing the window they are in.
+
+1999-12-08  Andy Piper  <andy@xemacs.org>
+
+       * xlwtabs.c: sync with Tabs 2.1.
+
+1999-12-07  Andy Piper  <andy@xemacs.org>
+
+       * lwlib-Xlw.c (lw_lucid_widget_p): make sure we pick up the
+       clip-window as well.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.23 is released.
index 6c3cd34..8063c7c 100644 (file)
@@ -524,6 +524,10 @@ lw_lucid_widget_p (Widget widget)
       XtClass (((CompositeWidget)widget)->composite.children [0])
        == xlwMenuWidgetClass;
 #endif
+#ifdef HAVE_WIDGETS
+  if (the_class == emacsManagerWidgetClass)
+    return True;
+#endif
   return False;
 }
 
index 14d05d4..796c1b0 100644 (file)
@@ -1,3 +1,13 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.24 is released.
+
+1999-12-07  Gunnar Evermann  <ge204@eng.cam.ac.uk>
+
+       * xemacs/startup.texi (Startup Paths): fix typo: EMACSPACKAGEPATH
+       instead of PACKAGEPATH 
+       From Marcus Harnisch <harnisch@mikrom.de>
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.23 is released.
index 35cba95..263feb5 100644 (file)
@@ -89,7 +89,7 @@ they are locate the early, late, and last package hierarchies
 respectively.  If two components are present, they locate the early and
 late hierarchies.  If only one component is present, it locates the late
 hierarchy.  At run time, the package path may also be specified via the
-@code{PACKAGEPATH} environment variable.
+@code{EMACSPACKAGEPATH} environment variable.
 
 An XEmacs package is laid out just like a normal installed XEmacs lisp
 directory.  It may have @file{lisp}, @file{etc}, @file{info}, and
index 5053ad5..3f537e4 100644 (file)
@@ -1,3 +1,12 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.24 is released.
+
+1999-11-28  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * xemacs.mak (depend): Only update `depend' if there were changes.
+       Use "perl ./make-src-depend" instead of "mkdepend".
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.23 is released.
index 8a8254b..9090b73 100644 (file)
@@ -1229,7 +1229,9 @@ distclean:
        $(DEL) *.info*
 
 depend:
-       mkdepend -f xemacs.mak -p$(OUTDIR)\ -o.obj -w9999 -- $(TEMACS_CPP_FLAGS) --  $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(DOC_SRC8) $(DOC_SRC9) $(LASTFILE_SRC)\lastfile.c $(LIB_SRC)\make-docfile.c $(LIB_SRC)\run.c
+       cd $(SRCDIR)
+       perl ./make-src-depend > depend.tmp
+       perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
 
 $(XEMACS)\Installation:
        @type > $(XEMACS)\Installation <<
index 2b45793..8694b38 100644 (file)
@@ -104,6 +104,9 @@ call_process_cleanup (Lisp_Object fdpid)
 {
   int fd = XINT (Fcar (fdpid));
   int pid = XINT (Fcdr (fdpid));
+#ifdef WINDOWSNT
+  HANDLE pHandle;
+#endif
 
   if (!call_process_exited &&
       EMACS_KILLPG (pid, SIGINT) == 0)
@@ -114,7 +117,17 @@ call_process_cleanup (Lisp_Object fdpid)
     /* #### "c-G" -- need non-consing Single-key-description */
     message ("Waiting for process to die...(type C-g again to kill it instantly)");
 
+#ifdef WINDOWSNT
+    pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+    if (pHandle == NULL)
+      {
+       warn_when_safe (Qprocess, Qwarning,
+                       "cannot open process (PID %d) for cleanup", pid);
+      }
+    wait_for_termination (pHandle);
+#else
     wait_for_termination (pid);
+#endif
 
     /* "Discard" the unwind protect.  */
     XCAR (fdpid) = Qnil;
@@ -170,6 +183,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you
   Lisp_Object infile, buffer, current_dir, display, path;
   int fd[2];
   int filefd;
+#ifdef WINDOWSNT
+  HANDLE pHandle;
+#endif
   int pid;
   char buf[16384];
   char *bufptr = buf;
@@ -359,6 +375,23 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you
 #ifdef WINDOWSNT
     pid = child_setup (filefd, fd1, fd_error, new_argv,
                        (char *) XSTRING_DATA (current_dir));
+    if (!INTP (buffer))
+      {
+       /* OpenProcess() as soon after child_setup as possible.  It's too
+          late once the process terminated. */
+       pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
+#if 0
+       if (pHandle == NULL)
+         {
+           /* #### seems to cause crash in unbind_to(...) below. APA */
+           warn_when_safe (Qprocess, Qwarning,
+                           "cannot open process to wait for");
+         }
+#endif
+      }
+    /* Close STDERR into the parent process.  We no longer need it. */
+    if (fd_error >= 0)
+      close (fd_error);
 #else  /* not WINDOWSNT */
     pid = fork ();
 
@@ -394,12 +427,14 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you
   if (!NILP (fork_error))
     signal_error (Qfile_error, fork_error);
 
+#ifndef WINDOWSNT
   if (pid < 0)
     {
       if (fd[0] >= 0)
        close (fd[0]);
       report_file_error ("Doing fork", Qnil);
     }
+#endif
 
   if (INTP (buffer))
     {
@@ -507,7 +542,11 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you
 
     QUIT;
     /* Wait for it to terminate, unless it already has.  */
+#ifdef WINDOWSNT
+    wait_for_termination (pHandle);
+#else
     wait_for_termination (pid);
+#endif
 
     /* Don't kill any children that the subprocess may have left behind
        when exiting.  */
index e44ca97..384b1e5 100644 (file)
@@ -931,7 +931,7 @@ reorganize_hash_table (Lisp_Hash_Table *ht)
 static void
 enlarge_hash_table (Lisp_Hash_Table *ht)
 {
-  size_t new_size = 
+  size_t new_size =
     hash_table_size ((size_t) ((double) ht->size * ht->rehash_size));
   resize_hash_table (ht, new_size);
 }
index adc0b0c..266505d 100644 (file)
@@ -437,7 +437,7 @@ union magic_data
 
 struct Lisp_Timeout
 {
-  struct lcrecord_header header; 
+  struct lcrecord_header header;
   int id; /* Id we use to identify the timeout over its lifetime */
   int interval_id; /* Id for this particular interval; this may
                      be different each time the timeout is
index 514c058..015cd00 100644 (file)
@@ -4333,5 +4333,9 @@ This variable affects the built-in functions only on Windows,
 on other platforms, it is initialized so that Lisp code can find out
 what the normal separator is.
 */ );
-  Vdirectory_sep_char = make_char ('/');
+#ifdef WINDOWSNT
+  Vdirectory_sep_char = make_char ('\\');
+#else
+   Vdirectory_sep_char = make_char ('/');
+#endif
 }
index b52eae9..bdd751d 100644 (file)
@@ -81,7 +81,6 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef THIS_IS_X11R6
 #include <X11/IntrinsicP.h>
-#include <X11/Xaw/XawImP.h>
 #endif
 
 #ifndef XIM_XLIB
@@ -323,9 +322,6 @@ XIM_init_frame (struct frame *f)
   static XtResource resources[] =
   {
     /*  name              class          represent'n   field    default value */
-#ifdef THIS_IS_X11R6
-    res(XtNinputMethod,   XtCInputMethod, XtRString,   inputmethod, (XtPointer) NULL),
-#endif
     res(XtNximStyles,     XtCXimStyles,  XtRXimStyles, styles,  (XtPointer) DefaultXIMStyles),
     res(XtNfontSet,       XtCFontSet,    XtRFontSet,   fontset, (XtPointer) XtDefaultFontSet),
     res(XtNximForeground, XtCForeground, XtRPixel,     fg,      (XtPointer) XtDefaultForeground),
index b8abdfc..a338ad1 100644 (file)
--- a/src/nas.c
+++ b/src/nas.c
@@ -146,10 +146,18 @@ init_play (
 #else
           char *server
 #endif
+          );
+char *
+init_play (
+#ifdef XTOOLKIT
+          Display *display
+#else
+          char *server
+#endif
           )
 {
   char *err_message;
-  SIGTYPE (*old_sigpipe) ();
+  SIGTYPE (*old_sigpipe) (int);
 
 #ifdef XTOOLKIT
   char * server = DisplayString (display);
@@ -223,7 +231,7 @@ init_play (
   return NULL;
 }
 
-void
+static void
 close_down_play (void)
 
 {
@@ -238,7 +246,7 @@ close_down_play (void)
  \********************************************************************/
 
 static void
-doneCB (AuServer       *aud,
+doneCB (AuServer       *auserver,
        AuEventHandlerRec *handler,
        AuEvent        *ev,
        AuPointer       data)
@@ -274,23 +282,23 @@ do_caching_play (Sound s,
 
   if (list == NULL)
     {
-      unsigned char *my_buf;
+      AuPointer my_buf;
 
       if (buf==NULL)
        {
-         if ((my_buf=malloc (SoundNumBytes (s)))==NULL)
+         if ((my_buf= (AuPointer) malloc (SoundNumBytes (s)))==NULL)
            {
              return;
            }
 
-         if (SoundReadFile (my_buf, SoundNumBytes (s), s) != SoundNumBytes (s))
+         if (SoundReadFile ((char *) my_buf, SoundNumBytes (s), s) != SoundNumBytes (s))
            {
              free (my_buf);
              return;
            }
        }
       else
-       my_buf=buf;
+       my_buf = (AuPointer) buf;
 
       id = AuSoundCreateBucketFromData (aud, 
                                        s,
@@ -322,6 +330,7 @@ do_caching_play (Sound s,
 #endif /* CACHE_SOUNDS */
 
 
+void wait_for_sounds (void);
 void 
 wait_for_sounds (void)
 
@@ -335,11 +344,12 @@ wait_for_sounds (void)
     }
 }
 
+int play_sound_file (char *sound_file, int volume);
 int
 play_sound_file (char *sound_file,
                 int volume)
 {
-  SIGTYPE (*old_sigpipe) ();
+  SIGTYPE (*old_sigpipe) (int);
 
 #ifdef ROBUST_PLAY
   old_sigpipe=signal (SIGPIPE, sigpipe_handle);
@@ -427,6 +437,7 @@ play_sound_file (char *sound_file,
   return 1;
 }
 
+int play_sound_data (unsigned char *data, int length, int volume);
 int
 play_sound_data (unsigned char *data,
                 int length, 
@@ -434,7 +445,7 @@ play_sound_data (unsigned char *data,
 {
   Sound s;
   int offset;
-  SIGTYPE (*old_sigpipe) ();
+  SIGTYPE (*old_sigpipe) (int);
 
 #if !defined (XTEVENTS)
   AuEvent         ev;
@@ -613,11 +624,11 @@ CatchErrorAndJump (AuServer *old_aud,
 /* Create a name from the sound. */
 
 static char *
-NameFromData (CONST unsigned char *buf,
+NameFromData (CONST char *buf,
              int len)
 
 {
-  unsigned char name[9];
+  char name[9];
   int i;
   char *s;
 
@@ -642,11 +653,11 @@ NameFromData (CONST unsigned char *buf,
 
   if (i==8)
     {
-      strcpy (s=malloc (10), name);
+      strcpy (s = (char *) malloc (10), name);
     }
   else 
     {
-      strcpy (s=malloc (15), "short sound");
+      strcpy (s = (char *) malloc (15), "short sound");
     }
 
   return s;
@@ -729,15 +740,15 @@ SndOpenDataForReading (CONST char *data,
 /* These functions here are for faking file I/O from buffer. */
 
 /* The "file" position */
-static int file_posn;
+static size_t file_posn;
 /* The length of the "file" */
-static int file_len;
+static size_t file_len;
 /* The actual "file" data. */
-CONST static char* file_data;
+static CONST void* file_data;
 
 /* Like fopen, but for a buffer in memory */
 static void
-dopen(CONST char* data, int length)
+dopen (CONST void* data, size_t length)
 {
    file_data = data;
    file_len = length;
@@ -746,15 +757,13 @@ dopen(CONST char* data, int length)
 
 /* Like fread, but for a buffer in memory */
 static int
-dread(char* buf, int size, int nitems)
+dread (void* buf, size_t size, size_t nitems)
 {
-  int nread;
-
-  nread = size * nitems;
+  size_t nread = size * nitems;
   
   if (file_posn + nread <= file_len)
     {
-      memcpy(buf, file_data + file_posn, size * nitems);
+      memcpy(buf, (char *) file_data + file_posn, size * nitems);
       file_posn += nread;
       return nitems;
     }
@@ -766,19 +775,17 @@ dread(char* buf, int size, int nitems)
 
 /* Like fgetc, but for a buffer in memory */
 static int
-dgetc()
+dgetc (void)
 {
-  int ch;
-  
   if (file_posn < file_len)
-    return file_data[file_posn++];
+    return ((char *)file_data)[file_posn++];
   else
     return -1;
 }
 
 /* Like fseek, but for a buffer in memory */
 static int
-dseek(long offset, int from)
+dseek (long offset, int from)
 {
   if (from == 0)
     file_posn = offset;
@@ -791,7 +798,7 @@ dseek(long offset, int from)
 }
 
 /* Like ftell, but for a buffer in memory */
-static int
+static long
 dtell()
 {
   return file_posn;
@@ -981,20 +988,20 @@ SoundOpenDataForReading (unsigned char *data,
   if (!(s = (Sound) malloc (sizeof (SoundRec))))
     return NULL;
 
-  if ((s->formatInfo = SndOpenDataForReading (data, length)) != NULL)
+  if ((s->formatInfo = SndOpenDataForReading ((char *) data, length)) != NULL)
     {
-      if (!(SoundFileInfo[SoundFileFormatSnd].toSound) (s))
+      if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatSnd].toSound)) (s))
        {
-         SndCloseFile (s->formatInfo);
+         SndCloseFile ((SndInfo *) (s->formatInfo));
          free (s);
          return NULL;
        }
     }
-  else if ((s->formatInfo = WaveOpenDataForReading (data, length)) != NULL)
+  else if ((s->formatInfo = WaveOpenDataForReading ((char *) data, length)) != NULL)
     {
-      if (!(SoundFileInfo[SoundFileFormatWave].toSound) (s))
+      if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatWave].toSound)) (s))
        {
-         WaveCloseFile (s->formatInfo);
+         WaveCloseFile ((WaveInfo *) (s->formatInfo));
          free (s);
          return NULL;
        }
@@ -1002,4 +1009,3 @@ SoundOpenDataForReading (unsigned char *data,
 
   return s;
 }
-
index 2fa0319..0c99c25 100644 (file)
--- a/src/nt.c
+++ b/src/nt.c
@@ -1315,6 +1315,40 @@ generate_inode_val (const char * name)
 
 #endif
 
+/* Since stat is encapsulated on Windows NT, we need to encapsulate
+   the equally broken fstat as well. */
+int
+fstat (int handle, struct stat *buffer)
+{
+  int ret;
+  BY_HANDLE_FILE_INFORMATION lpFileInfo;
+  /* Initialize values */
+  buffer->st_mode = 0;
+  buffer->st_size = 0;
+  buffer->st_dev = 0;
+  buffer->st_rdev = 0;
+  buffer->st_atime = 0;
+  buffer->st_ctime = 0;
+  buffer->st_mtime = 0;
+  buffer->st_nlink = 0;
+  ret = GetFileInformationByHandle((HANDLE) handle, &lpFileInfo);
+  if (!ret)
+    {
+      return -1;
+    }
+  else
+    {
+      buffer->st_mtime = convert_time (lpFileInfo.ftLastWriteTime);
+      buffer->st_atime = convert_time (lpFileInfo.ftLastAccessTime);
+      if (buffer->st_atime == 0) buffer->st_atime = buffer->st_mtime;
+      buffer->st_ctime = convert_time (lpFileInfo.ftCreationTime);
+      if (buffer->st_ctime == 0) buffer->st_ctime = buffer->st_mtime;
+      buffer->st_size = lpFileInfo.nFileSizeLow;
+      buffer->st_nlink = (short) lpFileInfo.nNumberOfLinks;
+      return 0;
+    }
+}
+
 /* MSVC stat function can't cope with UNC names and has other bugs, so
    replace it with our own.  This also allows us to calculate consistent
    inode values without hacks in the main Emacs code. */
index 45a7db3..1546a74 100644 (file)
@@ -445,16 +445,8 @@ create_child (CONST char *exe, char *cmdline, char *env,
   cp->procinfo.hThread=NULL;
   cp->procinfo.hProcess=NULL;
 
-  /* Hack for Windows 95, which assigns large (ie negative) pids */
-  if (cp->pid < 0)
-    cp->pid = -cp->pid;
-
   /* pid must fit in a Lisp_Int */
-#ifdef USE_UNION_TYPE
-  cp->pid = (cp->pid & ((1U << VALBITS) - 1));
-#else
-  cp->pid = (cp->pid & VALMASK);
-#endif
+
 
   *pPid = cp->pid;
   
index 0e3eb7d..1bdc703 100644 (file)
@@ -658,9 +658,7 @@ nt_create_process (struct Lisp_Process *p,
        kick_status_notify ();
       }
 
-    /* Hack to support Windows 95 negative pids */
-    return ((int)pi.dwProcessId < 0
-           ? -(int)pi.dwProcessId : (int)pi.dwProcessId);
+    return ((int)pi.dwProcessId);
   }
 }
 
@@ -719,7 +717,8 @@ nt_update_status_if_terminated (struct Lisp_Process* p)
 static void
 nt_send_process (Lisp_Object proc, struct lstream* lstream)
 {
-  struct Lisp_Process *p = XPROCESS (proc);
+  volatile Lisp_Object vol_proc = proc;
+  struct Lisp_Process *volatile p = XPROCESS (proc);
 
   /* use a reasonable-sized buffer (somewhere around the size of the
      stream buffer) so as to avoid inundating the stream with blocked
@@ -749,7 +748,7 @@ nt_send_process (Lisp_Object proc, struct lstream* lstream)
          p->core_dumped = 0;
          p->tick++;
          process_tick++;
-         deactivate_process (proc);
+         deactivate_process (*((Lisp_Object *) (&vol_proc)));
          error ("Broken pipe error sending to process %s; closed it",
                 XSTRING_DATA (p->name));
        }
@@ -890,6 +889,12 @@ get_internet_address (Lisp_Object host, struct sockaddr_in *address,
          /* Ok, got an answer */
          if (WSAGETASYNCERROR(msg.lParam) == NO_ERROR)
            success = 1;
+         else
+           {
+             warn_when_safe(Qstream, Qwarning,
+                            "cannot get IP address for host \"%s\"",
+                            XSTRING_DATA (host));
+           }
          goto done;
        }
       else if (msg.message == WM_TIMER && msg.wParam == SOCK_TIMER_ID)
@@ -980,7 +985,6 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service,
   retval = connect (s, (struct sockaddr *) &address, sizeof (address));
   if (retval != NO_ERROR && WSAGetLastError() != WSAEWOULDBLOCK)
     goto connect_failed;
-
   /* Wait while connection is established */
   while (1)
     {
@@ -1023,6 +1027,10 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service,
 
  connect_failed:  
   closesocket (s);
+  warn_when_safe(Qstream, Qwarning,
+                "failure to open network stream to host \"%s\" for service \"%s\"",
+                XSTRING_DATA (host),
+                XSTRING_DATA (service));
   report_file_error ("connection failed", list2 (host, name));
 }
 
index 023e038..f602178 100644 (file)
@@ -125,7 +125,8 @@ typedef int pid_t;
 /* XEmacs file I/O for DOS text files requires FILE_CODING */
 #define FILE_CODING
 
-#define DIRECTORY_SEP '\\'
+extern Lisp_Object Vdirectory_sep_char;
+#define DIRECTORY_SEP ((char)XCHARVAL(Vdirectory_sep_char))
 
 /* Define this to be the separator between devices and paths */
 #define DEVICE_SEP ':'
index c9fe1b0..09e21fb 100644 (file)
@@ -562,6 +562,9 @@ vars_of_sound (void)
 #ifdef HAVE_NAS_SOUND
   Fprovide (intern ("nas-sound"));
 #endif
+#ifdef HAVE_ESD_SOUND
+  Fprovide (intern ("esd-sound"));
+#endif
 
   DEFVAR_INT ("bell-volume", &bell_volume /*
 *How loud to be, from 0 to 100.
index 607d2e3..7f5486b 100644 (file)
@@ -234,8 +234,11 @@ wait_without_blocking (void)
 #endif /* NO_SUBPROCESSES */
 
 
-void
-wait_for_termination (int pid)
+#ifdef WINDOWSNT
+void wait_for_termination (HANDLE pHandle)
+#else
+void wait_for_termination (int pid)
+#endif
 {
   /* #### With the new improved SIGCHLD handling stuff, there is much
      less danger of race conditions and some of the comments below
@@ -345,6 +348,49 @@ wait_for_termination (int pid)
 
      Since implementations may add their own error indicators on top,
      we ignore it by default.  */
+#elif defined (WINDOWSNT)
+  int ret = 0, status = 0;
+  if (pHandle == NULL)
+    {
+      warn_when_safe (Qprocess, Qwarning, "Cannot wait for unknown process to terminate");
+      return;
+    }
+  do
+    {
+      QUIT;
+      ret = WaitForSingleObject(pHandle, 100);
+    }
+  while (ret == WAIT_TIMEOUT);
+  if (ret == WAIT_FAILED)
+    {
+      warn_when_safe (Qprocess, Qwarning, "waiting for process failed");
+    }
+  if (ret == WAIT_ABANDONED)
+    {
+      warn_when_safe (Qprocess, Qwarning,
+                     "process to wait for has been abandoned");
+    }
+  if (ret == WAIT_OBJECT_0)
+    {
+      ret = GetExitCodeProcess(pHandle, &status);
+      if (ret)
+       {
+         synch_process_alive = 0;
+         synch_process_retcode = status;
+       }
+      else
+       {
+         /* GetExitCodeProcess() didn't return a valid exit status,
+            nothing to do.  APA */
+         warn_when_safe (Qprocess, Qwarning,
+                         "failure to obtain process exit value");
+       }
+    }
+  if (pHandle != NULL && !CloseHandle(pHandle)) 
+    {
+      warn_when_safe (Qprocess, Qwarning,
+                     "failure to close unknown process");
+    }
 #elif defined (EMACS_BLOCK_SIGNAL) && !defined (BROKEN_WAIT_FOR_SIGNAL) && defined (SIGCHLD)
   while (1)
     {
@@ -376,7 +422,7 @@ wait_for_termination (int pid)
           Try defining BROKEN_WAIT_FOR_SIGNAL. */
        EMACS_WAIT_FOR_SIGNAL (SIGCHLD);
     }
-#else /* not HAVE_WAITPID and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */
+#else /* not HAVE_WAITPID and not WINDOWSNT and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */
   /* This approach is kind of cheesy but is guaranteed(?!) to work
      for all systems. */
   while (1)
@@ -578,7 +624,11 @@ sys_getpid (void)
 static void
 sys_subshell (void)
 {
+#ifdef WINDOWSNT
+  HANDLE pid;
+#else
   int pid;
+#endif
   struct save_signal saved_handlers[5];
   Lisp_Object dir;
   unsigned char *str = 0;
@@ -617,7 +667,7 @@ sys_subshell (void)
  xyzzy:
 
 #ifdef WINDOWSNT
-  pid = -1;
+  pid = NULL;
 #else /* not WINDOWSNT */
 
   pid = fork ();
@@ -651,7 +701,7 @@ sys_subshell (void)
 #ifdef WINDOWSNT
       /* Waits for process completion */
       pid = _spawnlp (_P_WAIT, sh, sh, NULL);
-      if (pid == -1)
+      if (pid == NULL)
         write (1, "Can't execute subshell", 22);
 
 #else   /* not WINDOWSNT */
@@ -3038,6 +3088,15 @@ sys_readlink (CONST char *path, char *buf, size_t bufsiz)
 #endif /* ENCAPSULATE_READLINK */
 
 
+#ifdef ENCAPSULATE_FSTAT
+int
+sys_fstat (int fd, struct stat *buf)
+{
+  return fstat (fd, buf);
+}
+#endif /* ENCAPSULATE_FSTAT */
+
+
 #ifdef ENCAPSULATE_STAT
 int
 sys_stat (CONST char *path, struct stat *buf)
index 04432e9..e4c3296 100644 (file)
@@ -44,7 +44,12 @@ Bufbyte get_eof_char (int fd);
 
 /* Wait for subprocess with process id `pid' to terminate and
    make sure it will get eliminated (not remain forever as a zombie) */
+#ifdef WINDOWSNT
+#include <windows.h>
+void wait_for_termination (HANDLE pid);
+#else
 void wait_for_termination (int pid);
+#endif
 
 /* flush any pending output
  * (may flush input as well; it does not matter the way we use it)
index aee0223..3616ef6 100644 (file)
@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef SYSV_SYSTEM_DIR
 # include <dirent.h>
-#elif defined (NONSYSTEM_DIR_LIBRARY) 
+#elif defined (NONSYSTEM_DIR_LIBRARY)
 # include "ndir.h"
 #elif defined (MSDOS)
 # include <dirent.h>
index e421d79..cc8f2de 100644 (file)
@@ -380,6 +380,18 @@ int sys_readlink (CONST char *path, char *buf, size_t bufsiz);
 # define sys_readlink readlink
 #endif
 
+#ifdef ENCAPSULATE_FSTAT
+int sys_fstat (int fd, struct stat *buf);
+#endif
+#if defined (ENCAPSULATE_FSTAT) && !defined (DONT_ENCAPSULATE)
+# undef fstat
+/* Need to use arguments to avoid messing with struct stat */
+# define fstat(fd, buf) sys_fstat (fd, buf)
+#endif
+#if !defined (ENCAPSULATE_FSTAT) && defined (DONT_ENCAPSULATE)
+# define sys_fstat fstat
+#endif
+
 #ifdef ENCAPSULATE_STAT
 int sys_stat (CONST char *path, struct stat *buf);
 #endif
index a2c5b36..c72e0c5 100644 (file)
@@ -338,7 +338,7 @@ Boston, MA 02111-1307, USA.  */
    if we're run from sh. */
 #  define EMACS_SET_PROCESS_GROUP(pg)
 #elif defined(__MINGW32__)
-#  define EMACS_SEPARATE_PROCESS_GROUP() 
+#  define EMACS_SEPARATE_PROCESS_GROUP()
 #else
 /* Under NeXTstep, a process group of 0 is not the same as specifying
    your own process ID, so we go ahead and specify it explicitly. */
index 5265be8..d238bff 100644 (file)
@@ -1,3 +1,7 @@
+1999-12-14  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.24 is released.
+
 1999-12-07  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.23 is released.
index 53a3857..d9dac41 100644 (file)
@@ -2,8 +2,8 @@
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=2
-emacs_beta_version=23
-xemacs_codename="Hebe"
+emacs_beta_version=24
+xemacs_codename="Hecate"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=8