View | Details | Raw Unified
Collapse All | Expand All

(-) emacs-18.59-orig/src/ChangeLog (+8 lines)
 Lines 1-3    Link Here 
2007-01-29  Ulrich Mueller  <ulm@kph.uni-mainz.de>
	* x11term.c (internal_socket_read): Handle XK_BackSpace key.
	* callproc.c, doprnt.c, emacssignal.h, fns.c, lisp.h, lread.c,
	malloc.c, process.c, s-linux.h, sysdep.c, terminfo.c, x11term.c:
	Fix GCC 4.1 compilation issues.
2004-03-09  Ulrich Mueller  <ulm@kph.uni-mainz.de>
2004-03-09  Ulrich Mueller  <ulm@kph.uni-mainz.de>
	* malloc.c (DONT_DEFINE_SIGNAL): Defined.
	* malloc.c (DONT_DEFINE_SIGNAL): Defined.
(-) emacs-18.59-orig/src/alloc.c (-2 / +2 lines)
 Lines 1073-1079    Link Here 
	  mark_object (&ptr->contents[i]);
	  mark_object (&ptr->contents[i]);
      }
      }
      break;
      break;
#endif 0
#endif
    case Lisp_Symbol:
    case Lisp_Symbol:
      {
      {
 Lines 1310-1316    Link Here 
	}
	}
  }
  }
#endif standalone
#endif /* standalone */
  /* Free all unmarked vectors */
  /* Free all unmarked vectors */
  {
  {
(-) emacs-18.59-orig/src/buffer.c (-2 / +2 lines)
 Lines 331-337    Link Here 
    return XBUFFER (buffer)->number;
    return XBUFFER (buffer)->number;
  }
  }
 */
 */
#endif NOTDEF
#endif /* NOTDEF */
DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
  "Return name of file BUFFER is visiting, or NIL if none.\n\
  "Return name of file BUFFER is visiting, or NIL if none.\n\
 Lines 601-607    Link Here 
#ifdef subprocesses
#ifdef subprocesses
  kill_buffer_processes (buf);
  kill_buffer_processes (buf);
#endif subprocesses
#endif
  tem = Vinhibit_quit;
  tem = Vinhibit_quit;
  Vinhibit_quit = Qt;
  Vinhibit_quit = Qt;
(-) emacs-18.59-orig/src/callproc.c (-2 / +3 lines)
 Lines 21-26    Link Here 
/* This must precede sys/signal.h on certain machines.  */
/* This must precede sys/signal.h on certain machines.  */
#include <sys/types.h>
#include <sys/types.h>
#include <signal.h>
#include <signal.h>
#include <unistd.h>
#include "config.h"
#include "config.h"
 Lines 241-247    Link Here 
    {
    {
#ifndef subprocesses
#ifndef subprocesses
      wait_without_blocking ();
      wait_without_blocking ();
#endif subprocesses
#endif
      return Qnil;
      return Qnil;
    }
    }
 Lines 413-419    Link Here 
#ifdef vipc
#ifdef vipc
  something missing here;
  something missing here;
#endif vipc
#endif
  /* execvp does not accept an environment arg so the only way
  /* execvp does not accept an environment arg so the only way
     to pass this environment is to set environ.  Our caller
     to pass this environment is to set environ.  Our caller
(-) emacs-18.59-orig/src/dispnew.c (-3 / +3 lines)
 Lines 586-600    Link Here 
{
{
#ifndef COMPILER_REGISTER_BUG
#ifndef COMPILER_REGISTER_BUG
  register
  register
#endif COMPILER_REGISTER_BUG
#endif
    struct window *w = XWINDOW (selected_window);
    struct window *w = XWINDOW (selected_window);
#ifndef COMPILER_REGISTER_BUG
#ifndef COMPILER_REGISTER_BUG
  register
  register
#endif COMPILER_REGISTER_BUG
#endif
    int hpos = cursor_hpos;
    int hpos = cursor_hpos;
#ifndef COMPILER_REGISTER_BUG
#ifndef COMPILER_REGISTER_BUG
  register
  register
#endif COMPILER_REGISTER_BUG
#endif
    int vpos = cursor_vpos;
    int vpos = cursor_vpos;
  /* Give up if about to continue line */
  /* Give up if about to continue line */
(-) emacs-18.59-orig/src/doprnt.c (+1 lines)
 Lines 22-27    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include "config.h"
doprnt (buffer, bufsize, format, nargs, args)
doprnt (buffer, bufsize, format, nargs, args)
     char *buffer;
     char *buffer;
(-) emacs-18.59-orig/src/editfns.c (-1 / +1 lines)
 Lines 1046-1052    Link Here 
    return Qnil;
    return Qnil;
  return build_string (val);
  return build_string (val);
}
}
#endif MAINTAIN_ENVIRONMENT
#endif /* MAINTAIN_ENVIRONMENT */


void
void
syms_of_editfns ()
syms_of_editfns ()
(-) emacs-18.59-orig/src/emacs.c (-3 / +3 lines)
 Lines 314-320    Link Here 
#ifdef HIGHPRI
#ifdef HIGHPRI
  setpriority (PRIO_PROCESS, getpid (), HIGHPRI);
  setpriority (PRIO_PROCESS, getpid (), HIGHPRI);
  setuid (getuid ());
  setuid (getuid ());
#endif HIGHPRI
#endif
  inhibit_window_system = 0;
  inhibit_window_system = 0;
 Lines 402-408    Link Here 
#endif
#endif
#ifdef SIGXFSZ
#ifdef SIGXFSZ
      signal (SIGXFSZ, fatal_error_signal);
      signal (SIGXFSZ, fatal_error_signal);
#endif SIGXFSZ
#endif
#ifdef AIX
#ifdef AIX
      /* This used to run fatal_error_signal,
      /* This used to run fatal_error_signal,
 Lines 489-495    Link Here 
      syms_of_alloc ();
      syms_of_alloc ();
#ifdef MAINTAIN_ENVIRONMENT
#ifdef MAINTAIN_ENVIRONMENT
      syms_of_environ ();
      syms_of_environ ();
#endif MAINTAIN_ENVIRONMENT
#endif /* MAINTAIN_ENVIRONMENT */
      syms_of_read ();
      syms_of_read ();
      syms_of_print ();
      syms_of_print ();
      syms_of_eval ();
      syms_of_eval ();
(-) emacs-18.59-orig/src/emacssignal.h (-1 / +2 lines)
 Lines 22-28    Link Here 
#define sighold(SIG)     ONLY_USED_IN_BSD_4_1
#define sighold(SIG)     ONLY_USED_IN_BSD_4_1
#define sigrelse(SIG)    ONLY_USED_IN_BSD_4_1
#define sigrelse(SIG)    ONLY_USED_IN_BSD_4_1
int (*sys_signal (int signal_number, int (*action)())) ();
typedef void (*signal_handler_t) ();
signal_handler_t sys_signal (int signal_number, signal_handler_t action);
int sys_sigpause (sigset_t new_mask);
int sys_sigpause (sigset_t new_mask);
sigset_t sys_sigblock (sigset_t new_mask);
sigset_t sys_sigblock (sigset_t new_mask);
sigset_t sys_sigunblock (sigset_t new_mask);
sigset_t sys_sigunblock (sigset_t new_mask);
(-) emacs-18.59-orig/src/fileio.c (-1 / +1 lines)
 Lines 784-790    Link Here 
	  if (o == target + 1 && o[-1] == '/' && o[0] == '/')
	  if (o == target + 1 && o[-1] == '/' && o[0] == '/')
	    ++o;
	    ++o;
	  else
	  else
#endif APOLLO
#endif /* APOLLO */
	  if (o == target && *o == '/')
	  if (o == target && *o == '/')
	    ++o;
	    ++o;
	  p += 3;
	  p += 3;
(-) emacs-18.59-orig/src/fns.c (-2 lines)
 Lines 90-97    Link Here 
  (arg)
  (arg)
     Lisp_Object arg;
     Lisp_Object arg;
{
{
  extern long random ();
  extern srandom ();
  extern long time ();
  extern long time ();
  if (EQ (arg, Qt))
  if (EQ (arg, Qt))
(-) emacs-18.59-orig/src/lisp.h (-1 lines)
 Lines 983-989    Link Here 
extern void debugger ();
extern void debugger ();
extern char *malloc (), *realloc (), *getenv (), *ctime (), *getwd ();
extern long *xmalloc (), *xrealloc ();
extern long *xmalloc (), *xrealloc ();
#ifdef MAINTAIN_ENVIRONMENT
#ifdef MAINTAIN_ENVIRONMENT
(-) emacs-18.59-orig/src/lread.c (-4 / +4 lines)
 Lines 229-235    Link Here 
     Lisp_Object stream;
     Lisp_Object stream;
{
{
  fclose (*(FILE **) XSTRING (stream));
  fclose (*(FILE **) XSTRING (stream));
  free (XPNTR (stream));
  free ((void *)(XPNTR (stream)));
  if (--load_in_progress < 0) load_in_progress = 0;
  if (--load_in_progress < 0) load_in_progress = 0;
  return Qnil;
  return Qnil;
}
}
 Lines 465-471    Link Here 
  return Qnil;
  return Qnil;
}
}
#endif standalone
#endif /* standalone */


DEFUN ("read", Fread, Sread, 0, 1, 0,
DEFUN ("read", Fread, Sread, 0, 1, 0,
  "Read one Lisp expression as text from STREAM, return as Lisp object.\n\
  "Read one Lisp expression as text from STREAM, return as Lisp object.\n\
 Lines 1141-1147    Link Here 
  sym = intern (string);
  sym = intern (string);
  XSET (XSYMBOL (sym)->function, Lisp_Subr, sname);
  XSET (XSYMBOL (sym)->function, Lisp_Subr, sname);
}
}
#endif NOTDEF
#endif /* NOTDEF */
/* New replacement for DefIntVar; it ignores the doc string argument
/* New replacement for DefIntVar; it ignores the doc string argument
   on the assumption that make-docfile will handle that.  */
   on the assumption that make-docfile will handle that.  */
 Lines 1230-1236    Link Here 
    abort ();
    abort ();
}
}
#endif standalone
#endif /* standalone */


init_read ()
init_read ()
{
{
(-) emacs-18.59-orig/src/malloc.c (-11 / +11 lines)
 Lines 213-220    Link Here 
static void getpool ();
static void getpool ();
char *malloc ();
/* Cause reinitialization based on job parameters;
/* Cause reinitialization based on job parameters;
  also declare where the end of pure storage is. */
  also declare where the end of pure storage is. */
void
void
 Lines 412-418    Link Here 
    }
    }
}
}


char *
void *
malloc (n)		/* get a block */
malloc (n)		/* get a block */
     unsigned n;
     unsigned n;
{
{
 Lines 488-495    Link Here 
  return (char *) p + ((sizeof *p + 7) & ~7);
  return (char *) p + ((sizeof *p + 7) & ~7);
}
}
void
free (mem)
free (mem)
     char *mem;
     void *mem;
{
{
  register struct mhead *p;
  register struct mhead *p;
  {
  {
 Lines 509-515    Link Here 
    if (p -> mh_alloc != ISALLOC)
    if (p -> mh_alloc != ISALLOC)
      abort ();
      abort ();
#else rcheck
#else /* rcheck */
    if (p -> mh_alloc != ISALLOC)
    if (p -> mh_alloc != ISALLOC)
      {
      {
	if (p -> mh_alloc == ISFREE)
	if (p -> mh_alloc == ISFREE)
 Lines 544-552    Link Here 
  }
  }
}
}
char *
void *
realloc (mem, n)
realloc (mem, n)
     char *mem;
     void *mem;
     register unsigned n;
     register unsigned n;
{
{
  register struct mhead *p;
  register struct mhead *p;
 Lines 606-612    Link Here 
/* This is in case something linked with Emacs calls calloc.  */
/* This is in case something linked with Emacs calls calloc.  */
char *
void *
calloc (num, size)
calloc (num, size)
     unsigned num, size;
     unsigned num, size;
{
{
 Lines 621-628    Link Here 
/* This is in case something linked with Emacs calls cfree.  */
/* This is in case something linked with Emacs calls cfree.  */
void
cfree (mem)
cfree (mem)
     char *mem;
     void *mem;
{
{
  return free (mem);
  return free (mem);
}
}
 Lines 656-663    Link Here 
#ifndef HPUX
#ifndef HPUX
/* This runs into trouble with getpagesize on HPUX.
/* This runs into trouble with getpagesize on HPUX.
   Patching out seems cleaner than the ugly fix needed.  */
   Patching out seems cleaner than the ugly fix needed.  */
char *
void *
valloc (size)
valloc (size_t size)
{
{
  return memalign (getpagesize (), size);
  return memalign (getpagesize (), size);
}
}
(-) emacs-18.59-orig/src/mocklisp.c (-1 / +1 lines)
 Lines 193-199    Link Here 
  XSETINT (to, XINT (to) + XINT (from));
  XSETINT (to, XINT (to) + XINT (from));
  return Fsubstring (string, from, to);
  return Fsubstring (string, from, to);
}
}
#endif NOTDEF
#endif /* NOTDEF */
DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0,
DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0,
  "Mocklisp-compatibility insert function.\n\
  "Mocklisp-compatibility insert function.\n\
Like the function `insert' except that any argument that is a number\n\
Like the function `insert' except that any argument that is a number\n\
(-) emacs-18.59-orig/src/process.c (-2 / +3 lines)
 Lines 1438-1444    Link Here 
  while (1)
  while (1)
    {
    {
      int value = connect (s, &address, sizeof address);
      int value = connect (s, (struct sockaddr *)&address, sizeof address);
      /* Continue if successeful.  */
      /* Continue if successeful.  */
      if (value != -1)
      if (value != -1)
	break;
	break;
 Lines 1592-1598    Link Here 
  int xerrno;
  int xerrno;
  Lisp_Object proc;
  Lisp_Object proc;
#ifdef HAVE_TIMEVAL
#ifdef HAVE_TIMEVAL
  struct timeval timeout, end_time, garbage;
  struct timeval timeout, end_time;
  struct timezone garbage;
#else
#else
  long timeout, end_time, temp;
  long timeout, end_time, temp;
#endif /* not HAVE_TIMEVAL */
#endif /* not HAVE_TIMEVAL */
(-) emacs-18.59-orig/src/regex.c (-5 / +5 lines)
 Lines 90-96    Link Here 
#ifndef NFAILURES
#ifndef NFAILURES
#define NFAILURES 80
#define NFAILURES 80
#endif NFAILURES
#endif
/* width of a byte in bits */
/* width of a byte in bits */
 Lines 536-542    Link Here 
	      PATFETCH (c);
	      PATFETCH (c);
	      PATPUSH (syntax_spec_code[c]);
	      PATPUSH (syntax_spec_code[c]);
	      break;
	      break;
#endif emacs
#endif /* emacs */
	    case 'w':
	    case 'w':
	      laststart = b;
	      laststart = b;
 Lines 833-839    Link Here 
	    if (SYNTAX (j) != (enum syntaxcode) k)
	    if (SYNTAX (j) != (enum syntaxcode) k)
	      fastmap[j] = 1;
	      fastmap[j] = 1;
	  break;
	  break;
#endif emacs
#endif /* emacs */
	case charset:
	case charset:
	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
 Lines 1475-1481    Link Here 
	  PREFETCH;
	  PREFETCH;
	  if (SYNTAX (*d++) != 0) goto fail;
	  if (SYNTAX (*d++) != 0) goto fail;
	  break;
	  break;
#endif not emacs
#endif /* not emacs */
	case begbuf:
	case begbuf:
	  if (d == string1)	/* Note, d cannot equal string2 */
	  if (d == string1)	/* Note, d cannot equal string2 */
 Lines 1722-1725    Link Here 
  exit (1);
  exit (1);
}
}
#endif test
#endif /* test */
(-) emacs-18.59-orig/src/s-linux.h (-1 / +7 lines)
 Lines 126-131    Link Here 


/* Special hacks needed to make Emacs run on this system.  */
/* Special hacks needed to make Emacs run on this system.  */
#ifdef emacs
#include <stdlib.h>
#include <string.h>
#endif
/* On USG systems the system calls are interruptable by signals
/* On USG systems the system calls are interruptable by signals
 that the user program has elected to catch.  Thus the system call
 that the user program has elected to catch.  Thus the system call
 must be retried in these cases.  To handle this without massive
 must be retried in these cases.  To handle this without massive
 Lines 224-229    Link Here 
#define MAXNAMLEN NAME_MAX	/* missing SYSV-ism */
#define MAXNAMLEN NAME_MAX	/* missing SYSV-ism */
#endif
#endif
#undef SIGSYS
#define SIGSYS SIGUNUSED	/* rename to harmless work-alike */
#define SIGSYS SIGUNUSED	/* rename to harmless work-alike */
#define VSWTCH VSWTC		/* mis-spelling in termios.h? */
#define VSWTCH VSWTC		/* mis-spelling in termios.h? */
 Lines 253-259    Link Here 
#define C_COMPILER gcc
#define C_COMPILER gcc
#define C_DEBUG_SWITCH -g
#define C_DEBUG_SWITCH -g
#define C_OPTIMIZE_SWITCH -O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2
#define C_OPTIMIZE_SWITCH -O2 -falign-loops=2 -falign-jumps=2 -falign-functions=2
#define OLDXMENU_OPTIONS CFLAGS=-O2 EXTRA=insque.o
#define OLDXMENU_OPTIONS CFLAGS=-O2 EXTRA=insque.o
#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
#define LIBS_DEBUG		/* override in config.h to include -lg */
#define LIBS_DEBUG		/* override in config.h to include -lg */
(-) emacs-18.59-orig/src/sysdep.c (-3 / +1 lines)
 Lines 2051-2058    Link Here 
#endif
#endif
}
}
typedef int (*signal_handler_t) ();
signal_handler_t
signal_handler_t
sys_signal (int signal_number, signal_handler_t action)
sys_signal (int signal_number, signal_handler_t action)
{
{
 Lines 2063-2069    Link Here 
#else
#else
  sigemptyset (&new_action.sa_mask);
  sigemptyset (&new_action.sa_mask);
  new_action.sa_handler = action;
  new_action.sa_handler = action;
  new_action.sa_flags = NULL;
  new_action.sa_flags = 0;
  sigaction (signal_number, &new_action, &old_action);
  sigaction (signal_number, &new_action, &old_action);
  return (old_action.sa_handler);
  return (old_action.sa_handler);
#endif /* DGUX */
#endif /* DGUX */
(-) emacs-18.59-orig/src/terminfo.c (+2 lines)
 Lines 17-22    Link Here 
along with GNU Emacs; see the file COPYING.  If not, write to
along with GNU Emacs; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
#include "config.h"
/* Define these variables that serve as global parameters to termcap,
/* Define these variables that serve as global parameters to termcap,
   so that we do not need to conditionalize the places in Emacs
   so that we do not need to conditionalize the places in Emacs
   that set them.  */
   that set them.  */
(-) emacs-18.59-orig/src/x11fns.c (-5 / +5 lines)
 Lines 884-890    Link Here 
		rawshift = (((unsigned) (XINT (shift_mask))) & 15) << 11;
		rawshift = (((unsigned) (XINT (shift_mask))) & 15) << 11;
		XRebindCode (rawkey, rawshift, rawstring, strsize);
		XRebindCode (rawkey, rawshift, rawstring, strsize);
	}
	}
#endif notdef
#endif /* notdef */
	return Qnil;
	return Qnil;
}
}
  
  
 Lines 918-928    Link Here 
			XRebindCode (rawkey, i << 11, rawstring, strsize);
			XRebindCode (rawkey, i << 11, rawstring, strsize);
		}
		}
	}
	}
#endif notdef
#endif /* notdef */
	return Qnil;
	return Qnil;
}
}
#endif foobar
#endif /* foobar */
XExitWithCoreDump ()
XExitWithCoreDump ()
{
{
 Lines 988-994    Link Here 
  defsubr (&Sx_set_font);
  defsubr (&Sx_set_font);
#ifdef notdef
#ifdef notdef
  defsubr (&Sx_set_icon);
  defsubr (&Sx_set_icon);
#endif notdef
#endif
  defsubr (&Scoordinates_in_window_p);
  defsubr (&Scoordinates_in_window_p);
  defsubr (&Sx_mouse_events);
  defsubr (&Sx_mouse_events);
  defsubr (&Sx_proc_mouse_event);
  defsubr (&Sx_proc_mouse_event);
 Lines 1012-1018    Link Here 
#ifdef notdef
#ifdef notdef
  defsubr (&Sx_rebind_key);
  defsubr (&Sx_rebind_key);
  defsubr (&Sx_rebind_keys);
  defsubr (&Sx_rebind_keys);
#endif notdef
#endif
  defsubr (&Sx_debug);
  defsubr (&Sx_debug);
}
}
(-) emacs-18.59-orig/src/x11term.c (-2 / +5 lines)
Line 33    Link Here 
#endif	lint
#endif
 Lines 1482-1487    Link Here 
	  strcpy(mapping_buf,"\016");
	  strcpy(mapping_buf,"\016");
	  nbytes = 1;
	  nbytes = 1;
	  break;
	  break;
	case XK_BackSpace:
	  strcpy(mapping_buf,"\177");
	  nbytes = 1;
	  break;
	}
	}
#ifndef AIX
#ifndef AIX
      }
      }
 Lines 1715-1721    Link Here 
	extern char *getenv ();
	extern char *getenv ();
	extern XTinterrupt_signal ();
	extern XTinterrupt_signal ();
	extern char *malloc ();
	extern Lisp_Object Vxterm, Vxterm1, Qt;
	extern Lisp_Object Vxterm, Vxterm1, Qt;
	extern int XIgnoreError();
	extern int XIgnoreError();
	int  ix;
	int  ix;
(-) emacs-18.59-orig/src/xdisp.c (-1 / +1 lines)
 Lines 2107-2113    Link Here 
  Lisp_Object root_window;
  Lisp_Object root_window;
#ifndef COMPILER_REGISTER_BUG
#ifndef COMPILER_REGISTER_BUG
  register
  register
#endif COMPILER_REGISTER_BUG
#endif
    struct window *mini_w;
    struct window *mini_w;
  this_line_bufpos = 0;
  this_line_bufpos = 0;
(-) emacs-18.59-orig/etc/ChangeLog (+8 lines)
 Lines 1-3    Link Here 
2007-01-29  Ulrich Mueller  <ulm@kph.uni-mainz.de>
	* emacsclient.c, server.c: Check for HAVE_SOCKETS instead of BSD.
	* cvtmail.c, emacsclient.c, env.c, etags.c, fakemail.c,
	make-docfile.c, movemail.c, server.c, sorted-doc.c,
	test-distrib.c, wakeup.c, yow.c: Fix GCC 4.1 compilation issues.
1998-05-30  Noah Friedman  <friedman@splode.com>
1998-05-30  Noah Friedman  <friedman@splode.com>
	* env.c (main): Declare sys_errlist if linux + glibc2.
	* env.c (main): Declare sys_errlist if linux + glibc2.
(-) emacs-18.59-orig/etc/cvtmail.c (-4 / +7 lines)
 Lines 36-42    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void *xmalloc(), *xrealloc();
main (argc, argv)
main (argc, argv)
     int argc;
     int argc;
 Lines 109-130    Link Here 
    ;
    ;
}
}
int
void *
xmalloc (size)
xmalloc (size)
     int size;
     int size;
{
{
  int result = malloc (size);
  void *result = malloc (size);
  if (!result)
  if (!result)
    fatal ("virtual memory exhausted", 0);
    fatal ("virtual memory exhausted", 0);
  return result;
  return result;
}
}
int
void *
xrealloc (ptr, size)
xrealloc (ptr, size)
     char *ptr;
     char *ptr;
     int size;
     int size;
{
{
  int result = realloc (ptr, size);
  void *result = realloc (ptr, size);
  if (!result)
  if (!result)
    fatal ("virtual memory exhausted");
    fatal ("virtual memory exhausted");
  return result;
  return result;
(-) emacs-18.59-orig/etc/emacsclient.c (-11 / +12 lines)
 Lines 27-34    Link Here 
#undef close
#undef close
#endif
#endif
#include <stdlib.h>
#include <string.h>
#if !defined(BSD) && !defined(HAVE_SYSVIPC)
#if !defined(HAVE_SOCKETS) && !defined(HAVE_SYSVIPC)
#include <stdio.h>
#include <stdio.h>
main (argc, argv)
main (argc, argv)
 Lines 41-49    Link Here 
  exit (1);
  exit (1);
}
}
#else /* BSD or HAVE_SYSVIPC */
#else /* HAVE_SOCKETS or HAVE_SYSVIPC */
#if defined(BSD) && ! defined (HAVE_SYSVIPC)
#if defined(HAVE_SOCKETS)
/* BSD code is very different from SYSV IPC code */
/* BSD code is very different from SYSV IPC code */
#include <sys/types.h>
#include <sys/types.h>
 Lines 51-60    Link Here 
#include <sys/un.h>
#include <sys/un.h>
#include <stdio.h>
#include <stdio.h>
#include <errno.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/stat.h>
extern int sys_nerr;
extern int sys_nerr;
extern char *sys_errlist[];
extern int errno;
extern int errno;
main (argc, argv)
main (argc, argv)
 Lines 69-76    Link Here 
  char string[BUFSIZ];
  char string[BUFSIZ];
  struct stat statbfr;
  struct stat statbfr;
  char *getenv (), *getwd ();
  if (argc < 2)
  if (argc < 2)
    {
    {
      fprintf (stderr, "Usage: %s filename\n", argv[0]);
      fprintf (stderr, "Usage: %s filename\n", argv[0]);
 Lines 112-118    Link Here 
  strcat (server.sun_path, "/.emacs_server");
  strcat (server.sun_path, "/.emacs_server");
#endif
#endif
  if (connect (s, &server, strlen (server.sun_path) + 2) < 0)
  if (connect (s, (struct sockaddr *)&server,
	       strlen (server.sun_path) + 2) < 0)
    {
    {
      fprintf (stderr, "%s: ", argv[0]);
      fprintf (stderr, "%s: ", argv[0]);
      perror ("connect");
      perror ("connect");
 Lines 125-135    Link Here 
      exit (1);
      exit (1);
    }
    }
  cwd = getwd (string);
  cwd = getcwd (string, sizeof string);
  if (cwd == 0)
  if (cwd == 0)
    {
    {
      /* getwd puts message in STRING if it fails.  */
      fprintf (stderr, "%s: %s (%s)\n", argv[0],
      fprintf (stderr, "%s: %s (%s)\n", argv[0], string,
	       "Cannot get current working directory",
	       (errno < sys_nerr) ? sys_errlist[errno] : "unknown error");
	       (errno < sys_nerr) ? sys_errlist[errno] : "unknown error");
      exit (1);
      exit (1);
    }
    }
 Lines 275-278    Link Here 
#endif /* HAVE_SYSVIPC */
#endif /* HAVE_SYSVIPC */
#endif /* BSD or HAVE_SYSVIPC */
#endif /* HAVE_SOCKETS or HAVE_SYSVIPC */
(-) emacs-18.59-orig/etc/env.c (-8 / +8 lines)
 Lines 89-94    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <errno.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
extern int execvp ();
extern int execvp ();
extern char *index ();
extern char *index ();
 Lines 102-108    Link Here 
int nenv_size;
int nenv_size;
char *progname;
char *progname;
void setenv ();
void xsetenv ();
void fatal ();
void fatal ();
main (argc, argv, envp)
main (argc, argv, envp)
 Lines 134-140    Link Here 
	if (tem)
	if (tem)
	  {
	  {
	    *tem = '\000';
	    *tem = '\000';
	    setenv (*envp, tem + 1);
	    xsetenv (*envp, tem + 1);
	  }
	  }
     }
     }
 Lines 145-151    Link Here 
	/* If arg contains a "=" it specifies to set a variable */
	/* If arg contains a "=" it specifies to set a variable */
	{
	{
	  *tem = '\000';
	  *tem = '\000';
	  setenv (*argv, tem + 1);
	  xsetenv (*argv, tem + 1);
	  argc--; argv++;
	  argc--; argv++;
	  continue;
	  continue;
	}
	}
 Lines 161-167    Link Here 
	/* Unset a variable */
	/* Unset a variable */
	{
	{
	  argc--; argv++;
	  argc--; argv++;
	  setenv (*argv, 0);
	  xsetenv (*argv, 0);
	  argc--; argv++;
	  argc--; argv++;
	}
	}
      else if (!strcmp (*argv, "-s") ||
      else if (!strcmp (*argv, "-s") ||
 Lines 174-180    Link Here 
	    fatal ("No value specified for variable \"%s\"",
	    fatal ("No value specified for variable \"%s\"",
		   tem);
		   tem);
	  argc--; argv++;
	  argc--; argv++;
	  setenv (tem, *argv);
	  xsetenv (tem, *argv);
	  argc--; argv++;
	  argc--; argv++;
	}
	}
      else if (!strcmp (*argv, "-") || !strcmp (*argv, "--"))
      else if (!strcmp (*argv, "-") || !strcmp (*argv, "--"))
 Lines 216-222    Link Here 
}
}
void
void
setenv (var, val)
xsetenv (var, val)
  register char *var, *val;
  register char *var, *val;
{
{
  register char **e;
  register char **e;
 Lines 274-281    Link Here 
}
}


extern char *malloc (), *realloc ();
void
void
memory_fatal ()
memory_fatal ()
{
{
(-) emacs-18.59-orig/etc/etags.c (-48 / +7 lines)
 Lines 21-26    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
/* Define the symbol ETAGS to make the program "etags",
/* Define the symbol ETAGS to make the program "etags",
 which makes emacs-style tag tables by default.
 which makes emacs-style tag tables by default.
 Lines 128-138    Link Here 
char *savestr();
char *savestr();
char *savenstr ();
char *savenstr ();
char *rindex();
char *index();
char *concat ();
char *concat ();
void initbuffer ();
void initbuffer ();
long readline ();
long readline ();
void *xmalloc(), *xrealloc();
/* A `struct linebuffer' is a structure which holds a line of text.
/* A `struct linebuffer' is a structure which holds a line of text.
 `readline' reads a line from a stream into a linebuffer
 `readline' reads a line from a stream into a linebuffer
 Lines 1380-1386    Link Here 
     char *defenv;
     char *defenv;
{
{
  register char *env, *p;
  register char *env, *p;
  extern char *savenstr (), *index ();
  struct TEX_tabent *tab;
  struct TEX_tabent *tab;
  int size, i;
  int size, i;
 Lines 1530-1576    Link Here 
  return dp;
  return dp;
}
}
/*
 * Return the ptr in sp at which the character c last
 * appears; NULL if not found
 *
 * Identical to v7 rindex, included for portability.
 */
char *
rindex(sp, c)
     register char *sp, c;
{
  register char *r;
  r = NULL;
  do
    {
      if (*sp == c)
	r = sp;
    } while (*sp++);
  return(r);
}
/*
 * Return the ptr in sp at which the character c first
 * appears; NULL if not found
 *
 * Identical to v7 index, included for portability.
 */
char *
index(sp, c)
     register char *sp, c;
{
  do
    {
      if (*sp == c)
	return (sp);
    } while (*sp++);
  return (NULL);
}
/* Print error message and exit.  */
/* Print error message and exit.  */
fatal (s1, s2)
fatal (s1, s2)
 Lines 1609-1630    Link Here 
/* Like malloc but get fatal error if memory is exhausted.  */
/* Like malloc but get fatal error if memory is exhausted.  */
int
void *
xmalloc (size)
xmalloc (size)
     int size;
     int size;
{
{
  int result = malloc (size);
  void *result = malloc (size);
  if (!result)
  if (!result)
    fatal ("virtual memory exhausted", 0);
    fatal ("virtual memory exhausted", 0);
  return result;
  return result;
}
}
int
void *
xrealloc (ptr, size)
xrealloc (ptr, size)
     char *ptr;
     char *ptr;
     int size;
     int size;
{
{
  int result = realloc (ptr, size);
  void *result = realloc (ptr, size);
  if (!result)
  if (!result)
    fatal ("virtual memory exhausted");
    fatal ("virtual memory exhausted");
  return result;
  return result;
(-) emacs-18.59-orig/etc/fakemail.c (-10 / +2 lines)
 Lines 43-48    Link Here 
#endif
#endif
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <time.h>
#include <time.h>
 Lines 123-138    Link Here 
extern FILE *popen ();
extern FILE *popen ();
extern int fclose (), pclose ();
extern int fclose (), pclose ();
extern char *malloc (), *realloc ();
#ifdef CURRENT_USER
#define cuserid(s) (getpwuid (geteuid ())->pw_name)
extern struct passwd *getpwuid ();
extern unsigned short geteuid ();
static struct passwd *my_entry;
#define cuserid(s)				\
(my_entry = getpwuid (((int) geteuid ())),	\
 my_entry->pw_name)
#endif


/* Utilities */
/* Utilities */
 Lines 564-570    Link Here 
  return;
  return;
}
}


void
main (argc, argv)
main (argc, argv)
     int argc;
     int argc;
     char **argv;
     char **argv;
(-) emacs-18.59-orig/etc/make-docfile.c (+2 lines)
 Lines 32-37    Link Here 
 */
 */
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
FILE *outfile;
FILE *outfile;
(-) emacs-18.59-orig/etc/movemail.c (-5 / +6 lines)
 Lines 52-57    Link Here 
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/file.h>
#include <errno.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NO_SHORTNAMES   /* Tell config not to load remap.h */
#define NO_SHORTNAMES   /* Tell config not to load remap.h */
#include "../src/config.h"
#include "../src/config.h"
 Lines 81-86    Link Here 
#undef close
#undef close
char *concat ();
char *concat ();
void *xmalloc ();
extern int errno;
extern int errno;
/* Nonzero means this is name of a lock file to delete on fatal error.  */
/* Nonzero means this is name of a lock file to delete on fatal error.  */
 Lines 320-326    Link Here 
     char *name;
     char *name;
{
{
  extern int errno, sys_nerr;
  extern int errno, sys_nerr;
  extern char *sys_errlist[];
  char *s;
  char *s;
  if (errno < sys_nerr)
  if (errno < sys_nerr)
 Lines 334-340    Link Here 
     char *name;
     char *name;
{
{
  extern int errno, sys_nerr;
  extern int errno, sys_nerr;
  extern char *sys_errlist[];
  char *s;
  char *s;
  if (errno < sys_nerr)
  if (errno < sys_nerr)
 Lines 365-375    Link Here 
/* Like malloc but get fatal error if memory is exhausted.  */
/* Like malloc but get fatal error if memory is exhausted.  */
int
void *
xmalloc (size)
xmalloc (size)
     int size;
     int size;
{
{
  int result = malloc (size);
  void *result = malloc (size);
  if (!result)
  if (!result)
    fatal ("virtual memory exhausted", 0);
    fatal ("virtual memory exhausted", 0);
  return result;
  return result;
 Lines 704-710    Link Here 
get_errmsg ()
get_errmsg ()
{
{
  extern int errno, sys_nerr;
  extern int errno, sys_nerr;
  extern char *sys_errlist[];
  char *s;
  char *s;
  if (errno < sys_nerr)
  if (errno < sys_nerr)
(-) emacs-18.59-orig/etc/server.c (-11 / +16 lines)
 Lines 36-43    Link Here 
#undef open
#undef open
#undef close
#undef close
#include <stdlib.h>
#include <string.h>
#if !defined(BSD) && !defined(HAVE_SYSVIPC)
#if !defined(HAVE_SOCKETS) && !defined(HAVE_SYSVIPC)
#include <stdio.h>
#include <stdio.h>
main ()
main ()
 Lines 47-55    Link Here 
  exit (1);
  exit (1);
}
}
#else /* BSD or HAVE_SYSVIPC */
#else /* HAVE_SOCKETS or HAVE_SYSVIPC */
#if defined (BSD) && ! defined (HAVE_SYSVIPC)
#if defined (HAVE_SOCKETS)
/* BSD code is very different from SYSV IPC code */
/* BSD code is very different from SYSV IPC code */
#include <sys/file.h>
#include <sys/file.h>
 Lines 110-116    Link Here 
  unlink (server.sun_path);
  unlink (server.sun_path);
#endif
#endif
  if (bind (s, &server, strlen (server.sun_path) + 2) < 0)
  if (bind (s, (struct sockaddr *)&server, strlen (server.sun_path) + 2) < 0)
    {
    {
      perror ("bind");
      perror ("bind");
      exit (1);
      exit (1);
 Lines 128-141    Link Here 
  signal (SIGPIPE, SIG_IGN);
  signal (SIGPIPE, SIG_IGN);
  for (;;)
  for (;;)
    {
    {
      int rmask = (1 << s) + 1;
      fd_set rmask;
      FD_ZERO (&rmask);
      FD_SET (0, &rmask);
      FD_SET (s, &rmask);
      if (select (s + 1, &rmask, 0, 0, 0) < 0)
      if (select (s + 1, &rmask, 0, 0, 0) < 0)
	perror ("select");
	perror ("select");
      if (rmask & (1 << s))	/* client sends list of filenames */
      if (FD_ISSET (s, &rmask))	/* client sends list of filenames */
	{
	{
	  fromlen = sizeof (fromunix);
	  fromlen = sizeof (fromunix);
	  fromunix.sun_family = AF_UNIX;
	  fromunix.sun_family = AF_UNIX;
	  infd = accept (s, &fromunix, &fromlen); /* open socket fd */
	  infd = accept (s, (struct sockaddr *)&fromunix, &fromlen);
				/* open socket fd */
	  if (infd < 0)
	  if (infd < 0)
	    {
	    {
	      if (errno == EMFILE || errno == ENFILE)
	      if (errno == EMFILE || errno == ENFILE)
 Lines 184-190    Link Here 
	  fflush (infile);
	  fflush (infile);
	  continue;
	  continue;
	}
	}
      else if (rmask & 1) /* emacs sends codeword, fd, and string message */
      else if (FD_ISSET (0, &rmask))
			/* emacs sends codeword, fd, and string message */
	{
	{
	  /* Read command codeword and fd */
	  /* Read command codeword and fd */
	  clearerr (stdin);
	  clearerr (stdin);
 Lines 325-330    Link Here 
#endif /* SYSV IPC */
#endif /* SYSV IPC */
#endif /* BSD && IPC */
#endif /* HAVE_SOCKETS && IPC */
(-) emacs-18.59-orig/etc/sorted-doc.c (-1 / +2 lines)
 Lines 7-14    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
extern char *malloc ();
char *xmalloc ();
char *xmalloc ();
#define NUL	'\0'
#define NUL	'\0'
(-) emacs-18.59-orig/etc/test-distrib.c (+1 lines)
 Lines 1-4    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
/* Break string in two parts to avoid buggy C compilers that ignore characters
/* Break string in two parts to avoid buggy C compilers that ignore characters
   after nulls in strings.  */
   after nulls in strings.  */
(-) emacs-18.59-orig/etc/wakeup.c (+1 lines)
 Lines 2-7    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <time.h>
#include <time.h>
#include <stdlib.h>
struct tm *localtime ();
struct tm *localtime ();
(-) emacs-18.59-orig/etc/yow.c (+2 lines)
 Lines 1-5    Link Here 
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "../src/paths.h"
#include "../src/paths.h"
/* zippy.c
/* zippy.c