Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 44766 | Differences between
and this patch

Collapse All | Expand All

(-)emacs-18.59-orig/src/ChangeLog (+8 lines)
Lines 1-3 Link Here
1
2007-01-29  Ulrich Mueller  <ulm@kph.uni-mainz.de>
2
3
	* x11term.c (internal_socket_read): Handle XK_BackSpace key.
4
5
	* callproc.c, doprnt.c, emacssignal.h, fns.c, lisp.h, lread.c,
6
	malloc.c, process.c, s-linux.h, sysdep.c, terminfo.c, x11term.c:
7
	Fix GCC 4.1 compilation issues.
8
1
2004-03-09  Ulrich Mueller  <ulm@kph.uni-mainz.de>
9
2004-03-09  Ulrich Mueller  <ulm@kph.uni-mainz.de>
2
10
3
	* malloc.c (DONT_DEFINE_SIGNAL): Defined.
11
	* malloc.c (DONT_DEFINE_SIGNAL): Defined.
(-)emacs-18.59-orig/src/alloc.c (-2 / +2 lines)
Lines 1073-1079 Link Here
1073
	  mark_object (&ptr->contents[i]);
1073
	  mark_object (&ptr->contents[i]);
1074
      }
1074
      }
1075
      break;
1075
      break;
1076
#endif 0
1076
#endif
1077
1077
1078
    case Lisp_Symbol:
1078
    case Lisp_Symbol:
1079
      {
1079
      {
Lines 1310-1316 Link Here
1310
	}
1310
	}
1311
  }
1311
  }
1312
1312
1313
#endif standalone
1313
#endif /* standalone */
1314
1314
1315
  /* Free all unmarked vectors */
1315
  /* Free all unmarked vectors */
1316
  {
1316
  {
(-)emacs-18.59-orig/src/buffer.c (-2 / +2 lines)
Lines 331-337 Link Here
331
    return XBUFFER (buffer)->number;
331
    return XBUFFER (buffer)->number;
332
  }
332
  }
333
 */
333
 */
334
#endif NOTDEF
334
#endif /* NOTDEF */
335
335
336
DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
336
DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
337
  "Return name of file BUFFER is visiting, or NIL if none.\n\
337
  "Return name of file BUFFER is visiting, or NIL if none.\n\
Lines 601-607 Link Here
601
601
602
#ifdef subprocesses
602
#ifdef subprocesses
603
  kill_buffer_processes (buf);
603
  kill_buffer_processes (buf);
604
#endif subprocesses
604
#endif
605
605
606
  tem = Vinhibit_quit;
606
  tem = Vinhibit_quit;
607
  Vinhibit_quit = Qt;
607
  Vinhibit_quit = Qt;
(-)emacs-18.59-orig/src/callproc.c (-2 / +3 lines)
Lines 21-26 Link Here
21
/* This must precede sys/signal.h on certain machines.  */
21
/* This must precede sys/signal.h on certain machines.  */
22
#include <sys/types.h>
22
#include <sys/types.h>
23
#include <signal.h>
23
#include <signal.h>
24
#include <unistd.h>
24
25
25
#include "config.h"
26
#include "config.h"
26
27
Lines 241-247 Link Here
241
    {
242
    {
242
#ifndef subprocesses
243
#ifndef subprocesses
243
      wait_without_blocking ();
244
      wait_without_blocking ();
244
#endif subprocesses
245
#endif
245
      return Qnil;
246
      return Qnil;
246
    }
247
    }
247
248
Lines 413-419 Link Here
413
414
414
#ifdef vipc
415
#ifdef vipc
415
  something missing here;
416
  something missing here;
416
#endif vipc
417
#endif
417
418
418
  /* execvp does not accept an environment arg so the only way
419
  /* execvp does not accept an environment arg so the only way
419
     to pass this environment is to set environ.  Our caller
420
     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
586
{
586
{
587
#ifndef COMPILER_REGISTER_BUG
587
#ifndef COMPILER_REGISTER_BUG
588
  register
588
  register
589
#endif COMPILER_REGISTER_BUG
589
#endif
590
    struct window *w = XWINDOW (selected_window);
590
    struct window *w = XWINDOW (selected_window);
591
#ifndef COMPILER_REGISTER_BUG
591
#ifndef COMPILER_REGISTER_BUG
592
  register
592
  register
593
#endif COMPILER_REGISTER_BUG
593
#endif
594
    int hpos = cursor_hpos;
594
    int hpos = cursor_hpos;
595
#ifndef COMPILER_REGISTER_BUG
595
#ifndef COMPILER_REGISTER_BUG
596
  register
596
  register
597
#endif COMPILER_REGISTER_BUG
597
#endif
598
    int vpos = cursor_vpos;
598
    int vpos = cursor_vpos;
599
599
600
  /* Give up if about to continue line */
600
  /* Give up if about to continue line */
(-)emacs-18.59-orig/src/doprnt.c (+1 lines)
Lines 22-27 Link Here
22
22
23
#include <stdio.h>
23
#include <stdio.h>
24
#include <ctype.h>
24
#include <ctype.h>
25
#include "config.h"
25
26
26
doprnt (buffer, bufsize, format, nargs, args)
27
doprnt (buffer, bufsize, format, nargs, args)
27
     char *buffer;
28
     char *buffer;
(-)emacs-18.59-orig/src/editfns.c (-1 / +1 lines)
Lines 1046-1052 Link Here
1046
    return Qnil;
1046
    return Qnil;
1047
  return build_string (val);
1047
  return build_string (val);
1048
}
1048
}
1049
#endif MAINTAIN_ENVIRONMENT
1049
#endif /* MAINTAIN_ENVIRONMENT */
1050
1050
1051
void
1051
void
1052
syms_of_editfns ()
1052
syms_of_editfns ()
(-)emacs-18.59-orig/src/emacs.c (-3 / +3 lines)
Lines 314-320 Link Here
314
#ifdef HIGHPRI
314
#ifdef HIGHPRI
315
  setpriority (PRIO_PROCESS, getpid (), HIGHPRI);
315
  setpriority (PRIO_PROCESS, getpid (), HIGHPRI);
316
  setuid (getuid ());
316
  setuid (getuid ());
317
#endif HIGHPRI
317
#endif
318
318
319
  inhibit_window_system = 0;
319
  inhibit_window_system = 0;
320
320
Lines 402-408 Link Here
402
#endif
402
#endif
403
#ifdef SIGXFSZ
403
#ifdef SIGXFSZ
404
      signal (SIGXFSZ, fatal_error_signal);
404
      signal (SIGXFSZ, fatal_error_signal);
405
#endif SIGXFSZ
405
#endif
406
406
407
#ifdef AIX
407
#ifdef AIX
408
      /* This used to run fatal_error_signal,
408
      /* This used to run fatal_error_signal,
Lines 489-495 Link Here
489
      syms_of_alloc ();
489
      syms_of_alloc ();
490
#ifdef MAINTAIN_ENVIRONMENT
490
#ifdef MAINTAIN_ENVIRONMENT
491
      syms_of_environ ();
491
      syms_of_environ ();
492
#endif MAINTAIN_ENVIRONMENT
492
#endif /* MAINTAIN_ENVIRONMENT */
493
      syms_of_read ();
493
      syms_of_read ();
494
      syms_of_print ();
494
      syms_of_print ();
495
      syms_of_eval ();
495
      syms_of_eval ();
(-)emacs-18.59-orig/src/emacssignal.h (-1 / +2 lines)
Lines 22-28 Link Here
22
#define sighold(SIG)     ONLY_USED_IN_BSD_4_1
22
#define sighold(SIG)     ONLY_USED_IN_BSD_4_1
23
#define sigrelse(SIG)    ONLY_USED_IN_BSD_4_1
23
#define sigrelse(SIG)    ONLY_USED_IN_BSD_4_1
24
24
25
int (*sys_signal (int signal_number, int (*action)())) ();
25
typedef void (*signal_handler_t) ();
26
signal_handler_t sys_signal (int signal_number, signal_handler_t action);
26
int sys_sigpause (sigset_t new_mask);
27
int sys_sigpause (sigset_t new_mask);
27
sigset_t sys_sigblock (sigset_t new_mask);
28
sigset_t sys_sigblock (sigset_t new_mask);
28
sigset_t sys_sigunblock (sigset_t new_mask);
29
sigset_t sys_sigunblock (sigset_t new_mask);
(-)emacs-18.59-orig/src/fileio.c (-1 / +1 lines)
Lines 784-790 Link Here
784
	  if (o == target + 1 && o[-1] == '/' && o[0] == '/')
784
	  if (o == target + 1 && o[-1] == '/' && o[0] == '/')
785
	    ++o;
785
	    ++o;
786
	  else
786
	  else
787
#endif APOLLO
787
#endif /* APOLLO */
788
	  if (o == target && *o == '/')
788
	  if (o == target && *o == '/')
789
	    ++o;
789
	    ++o;
790
	  p += 3;
790
	  p += 3;
(-)emacs-18.59-orig/src/fns.c (-2 lines)
Lines 90-97 Link Here
90
  (arg)
90
  (arg)
91
     Lisp_Object arg;
91
     Lisp_Object arg;
92
{
92
{
93
  extern long random ();
94
  extern srandom ();
95
  extern long time ();
93
  extern long time ();
96
94
97
  if (EQ (arg, Qt))
95
  if (EQ (arg, Qt))
(-)emacs-18.59-orig/src/lisp.h (-1 lines)
Lines 983-989 Link Here
983
983
984
extern void debugger ();
984
extern void debugger ();
985
985
986
extern char *malloc (), *realloc (), *getenv (), *ctime (), *getwd ();
987
extern long *xmalloc (), *xrealloc ();
986
extern long *xmalloc (), *xrealloc ();
988
987
989
#ifdef MAINTAIN_ENVIRONMENT
988
#ifdef MAINTAIN_ENVIRONMENT
(-)emacs-18.59-orig/src/lread.c (-4 / +4 lines)
Lines 229-235 Link Here
229
     Lisp_Object stream;
229
     Lisp_Object stream;
230
{
230
{
231
  fclose (*(FILE **) XSTRING (stream));
231
  fclose (*(FILE **) XSTRING (stream));
232
  free (XPNTR (stream));
232
  free ((void *)(XPNTR (stream)));
233
  if (--load_in_progress < 0) load_in_progress = 0;
233
  if (--load_in_progress < 0) load_in_progress = 0;
234
  return Qnil;
234
  return Qnil;
235
}
235
}
Lines 465-471 Link Here
465
  return Qnil;
465
  return Qnil;
466
}
466
}
467
467
468
#endif standalone
468
#endif /* standalone */
469
469
470
DEFUN ("read", Fread, Sread, 0, 1, 0,
470
DEFUN ("read", Fread, Sread, 0, 1, 0,
471
  "Read one Lisp expression as text from STREAM, return as Lisp object.\n\
471
  "Read one Lisp expression as text from STREAM, return as Lisp object.\n\
Lines 1141-1147 Link Here
1141
  sym = intern (string);
1141
  sym = intern (string);
1142
  XSET (XSYMBOL (sym)->function, Lisp_Subr, sname);
1142
  XSET (XSYMBOL (sym)->function, Lisp_Subr, sname);
1143
}
1143
}
1144
#endif NOTDEF
1144
#endif /* NOTDEF */
1145
1145
1146
/* New replacement for DefIntVar; it ignores the doc string argument
1146
/* New replacement for DefIntVar; it ignores the doc string argument
1147
   on the assumption that make-docfile will handle that.  */
1147
   on the assumption that make-docfile will handle that.  */
Lines 1230-1236 Link Here
1230
    abort ();
1230
    abort ();
1231
}
1231
}
1232
1232
1233
#endif standalone
1233
#endif /* standalone */
1234
1234
1235
init_read ()
1235
init_read ()
1236
{
1236
{
(-)emacs-18.59-orig/src/malloc.c (-11 / +11 lines)
Lines 213-220 Link Here
213
213
214
static void getpool ();
214
static void getpool ();
215
215
216
char *malloc ();
217
218
/* Cause reinitialization based on job parameters;
216
/* Cause reinitialization based on job parameters;
219
  also declare where the end of pure storage is. */
217
  also declare where the end of pure storage is. */
220
void
218
void
Lines 412-418 Link Here
412
    }
410
    }
413
}
411
}
414
412
415
char *
413
void *
416
malloc (n)		/* get a block */
414
malloc (n)		/* get a block */
417
     unsigned n;
415
     unsigned n;
418
{
416
{
Lines 488-495 Link Here
488
  return (char *) p + ((sizeof *p + 7) & ~7);
486
  return (char *) p + ((sizeof *p + 7) & ~7);
489
}
487
}
490
488
489
void
491
free (mem)
490
free (mem)
492
     char *mem;
491
     void *mem;
493
{
492
{
494
  register struct mhead *p;
493
  register struct mhead *p;
495
  {
494
  {
Lines 509-515 Link Here
509
    if (p -> mh_alloc != ISALLOC)
508
    if (p -> mh_alloc != ISALLOC)
510
      abort ();
509
      abort ();
511
510
512
#else rcheck
511
#else /* rcheck */
513
    if (p -> mh_alloc != ISALLOC)
512
    if (p -> mh_alloc != ISALLOC)
514
      {
513
      {
515
	if (p -> mh_alloc == ISFREE)
514
	if (p -> mh_alloc == ISFREE)
Lines 544-552 Link Here
544
  }
543
  }
545
}
544
}
546
545
547
char *
546
void *
548
realloc (mem, n)
547
realloc (mem, n)
549
     char *mem;
548
     void *mem;
550
     register unsigned n;
549
     register unsigned n;
551
{
550
{
552
  register struct mhead *p;
551
  register struct mhead *p;
Lines 606-612 Link Here
606
605
607
/* This is in case something linked with Emacs calls calloc.  */
606
/* This is in case something linked with Emacs calls calloc.  */
608
607
609
char *
608
void *
610
calloc (num, size)
609
calloc (num, size)
611
     unsigned num, size;
610
     unsigned num, size;
612
{
611
{
Lines 621-628 Link Here
621
620
622
/* This is in case something linked with Emacs calls cfree.  */
621
/* This is in case something linked with Emacs calls cfree.  */
623
622
623
void
624
cfree (mem)
624
cfree (mem)
625
     char *mem;
625
     void *mem;
626
{
626
{
627
  return free (mem);
627
  return free (mem);
628
}
628
}
Lines 656-663 Link Here
656
#ifndef HPUX
656
#ifndef HPUX
657
/* This runs into trouble with getpagesize on HPUX.
657
/* This runs into trouble with getpagesize on HPUX.
658
   Patching out seems cleaner than the ugly fix needed.  */
658
   Patching out seems cleaner than the ugly fix needed.  */
659
char *
659
void *
660
valloc (size)
660
valloc (size_t size)
661
{
661
{
662
  return memalign (getpagesize (), size);
662
  return memalign (getpagesize (), size);
663
}
663
}
(-)emacs-18.59-orig/src/mocklisp.c (-1 / +1 lines)
Lines 193-199 Link Here
193
  XSETINT (to, XINT (to) + XINT (from));
193
  XSETINT (to, XINT (to) + XINT (from));
194
  return Fsubstring (string, from, to);
194
  return Fsubstring (string, from, to);
195
}
195
}
196
#endif NOTDEF
196
#endif /* NOTDEF */
197
DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0,
197
DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0,
198
  "Mocklisp-compatibility insert function.\n\
198
  "Mocklisp-compatibility insert function.\n\
199
Like the function `insert' except that any argument that is a number\n\
199
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
1438
1438
1439
  while (1)
1439
  while (1)
1440
    {
1440
    {
1441
      int value = connect (s, &address, sizeof address);
1441
      int value = connect (s, (struct sockaddr *)&address, sizeof address);
1442
      /* Continue if successeful.  */
1442
      /* Continue if successeful.  */
1443
      if (value != -1)
1443
      if (value != -1)
1444
	break;
1444
	break;
Lines 1592-1598 Link Here
1592
  int xerrno;
1592
  int xerrno;
1593
  Lisp_Object proc;
1593
  Lisp_Object proc;
1594
#ifdef HAVE_TIMEVAL
1594
#ifdef HAVE_TIMEVAL
1595
  struct timeval timeout, end_time, garbage;
1595
  struct timeval timeout, end_time;
1596
  struct timezone garbage;
1596
#else
1597
#else
1597
  long timeout, end_time, temp;
1598
  long timeout, end_time, temp;
1598
#endif /* not HAVE_TIMEVAL */
1599
#endif /* not HAVE_TIMEVAL */
(-)emacs-18.59-orig/src/regex.c (-5 / +5 lines)
Lines 90-96 Link Here
90
90
91
#ifndef NFAILURES
91
#ifndef NFAILURES
92
#define NFAILURES 80
92
#define NFAILURES 80
93
#endif NFAILURES
93
#endif
94
94
95
/* width of a byte in bits */
95
/* width of a byte in bits */
96
96
Lines 536-542 Link Here
536
	      PATFETCH (c);
536
	      PATFETCH (c);
537
	      PATPUSH (syntax_spec_code[c]);
537
	      PATPUSH (syntax_spec_code[c]);
538
	      break;
538
	      break;
539
#endif emacs
539
#endif /* emacs */
540
540
541
	    case 'w':
541
	    case 'w':
542
	      laststart = b;
542
	      laststart = b;
Lines 833-839 Link Here
833
	    if (SYNTAX (j) != (enum syntaxcode) k)
833
	    if (SYNTAX (j) != (enum syntaxcode) k)
834
	      fastmap[j] = 1;
834
	      fastmap[j] = 1;
835
	  break;
835
	  break;
836
#endif emacs
836
#endif /* emacs */
837
837
838
	case charset:
838
	case charset:
839
	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
839
	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
Lines 1475-1481 Link Here
1475
	  PREFETCH;
1475
	  PREFETCH;
1476
	  if (SYNTAX (*d++) != 0) goto fail;
1476
	  if (SYNTAX (*d++) != 0) goto fail;
1477
	  break;
1477
	  break;
1478
#endif not emacs
1478
#endif /* not emacs */
1479
1479
1480
	case begbuf:
1480
	case begbuf:
1481
	  if (d == string1)	/* Note, d cannot equal string2 */
1481
	  if (d == string1)	/* Note, d cannot equal string2 */
Lines 1722-1725 Link Here
1722
  exit (1);
1722
  exit (1);
1723
}
1723
}
1724
1724
1725
#endif test
1725
#endif /* test */
(-)emacs-18.59-orig/src/s-linux.h (-1 / +7 lines)
Lines 126-131 Link Here
126
126
127
/* Special hacks needed to make Emacs run on this system.  */
127
/* Special hacks needed to make Emacs run on this system.  */
128
128
129
#ifdef emacs
130
#include <stdlib.h>
131
#include <string.h>
132
#endif
133
129
/* On USG systems the system calls are interruptable by signals
134
/* On USG systems the system calls are interruptable by signals
130
 that the user program has elected to catch.  Thus the system call
135
 that the user program has elected to catch.  Thus the system call
131
 must be retried in these cases.  To handle this without massive
136
 must be retried in these cases.  To handle this without massive
Lines 224-229 Link Here
224
#define MAXNAMLEN NAME_MAX	/* missing SYSV-ism */
229
#define MAXNAMLEN NAME_MAX	/* missing SYSV-ism */
225
#endif
230
#endif
226
231
232
#undef SIGSYS
227
#define SIGSYS SIGUNUSED	/* rename to harmless work-alike */
233
#define SIGSYS SIGUNUSED	/* rename to harmless work-alike */
228
#define VSWTCH VSWTC		/* mis-spelling in termios.h? */
234
#define VSWTCH VSWTC		/* mis-spelling in termios.h? */
229
235
Lines 253-259 Link Here
253
259
254
#define C_COMPILER gcc
260
#define C_COMPILER gcc
255
#define C_DEBUG_SWITCH -g
261
#define C_DEBUG_SWITCH -g
256
#define C_OPTIMIZE_SWITCH -O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2
262
#define C_OPTIMIZE_SWITCH -O2 -falign-loops=2 -falign-jumps=2 -falign-functions=2
257
#define OLDXMENU_OPTIONS CFLAGS=-O2 EXTRA=insque.o
263
#define OLDXMENU_OPTIONS CFLAGS=-O2 EXTRA=insque.o
258
#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
264
#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
259
#define LIBS_DEBUG		/* override in config.h to include -lg */
265
#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
2051
#endif
2051
#endif
2052
}
2052
}
2053
2053
2054
typedef int (*signal_handler_t) ();
2055
2056
signal_handler_t
2054
signal_handler_t
2057
sys_signal (int signal_number, signal_handler_t action)
2055
sys_signal (int signal_number, signal_handler_t action)
2058
{
2056
{
Lines 2063-2069 Link Here
2063
#else
2061
#else
2064
  sigemptyset (&new_action.sa_mask);
2062
  sigemptyset (&new_action.sa_mask);
2065
  new_action.sa_handler = action;
2063
  new_action.sa_handler = action;
2066
  new_action.sa_flags = NULL;
2064
  new_action.sa_flags = 0;
2067
  sigaction (signal_number, &new_action, &old_action);
2065
  sigaction (signal_number, &new_action, &old_action);
2068
  return (old_action.sa_handler);
2066
  return (old_action.sa_handler);
2069
#endif /* DGUX */
2067
#endif /* DGUX */
(-)emacs-18.59-orig/src/terminfo.c (+2 lines)
Lines 17-22 Link Here
17
along with GNU Emacs; see the file COPYING.  If not, write to
17
along with GNU Emacs; see the file COPYING.  If not, write to
18
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
18
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
19
20
#include "config.h"
21
20
/* Define these variables that serve as global parameters to termcap,
22
/* Define these variables that serve as global parameters to termcap,
21
   so that we do not need to conditionalize the places in Emacs
23
   so that we do not need to conditionalize the places in Emacs
22
   that set them.  */
24
   that set them.  */
(-)emacs-18.59-orig/src/x11fns.c (-5 / +5 lines)
Lines 884-890 Link Here
884
		rawshift = (((unsigned) (XINT (shift_mask))) & 15) << 11;
884
		rawshift = (((unsigned) (XINT (shift_mask))) & 15) << 11;
885
		XRebindCode (rawkey, rawshift, rawstring, strsize);
885
		XRebindCode (rawkey, rawshift, rawstring, strsize);
886
	}
886
	}
887
#endif notdef
887
#endif /* notdef */
888
	return Qnil;
888
	return Qnil;
889
}
889
}
890
  
890
  
Lines 918-928 Link Here
918
			XRebindCode (rawkey, i << 11, rawstring, strsize);
918
			XRebindCode (rawkey, i << 11, rawstring, strsize);
919
		}
919
		}
920
	}
920
	}
921
#endif notdef
921
#endif /* notdef */
922
	return Qnil;
922
	return Qnil;
923
}
923
}
924
924
925
#endif foobar
925
#endif /* foobar */
926
926
927
XExitWithCoreDump ()
927
XExitWithCoreDump ()
928
{
928
{
Lines 988-994 Link Here
988
  defsubr (&Sx_set_font);
988
  defsubr (&Sx_set_font);
989
#ifdef notdef
989
#ifdef notdef
990
  defsubr (&Sx_set_icon);
990
  defsubr (&Sx_set_icon);
991
#endif notdef
991
#endif
992
  defsubr (&Scoordinates_in_window_p);
992
  defsubr (&Scoordinates_in_window_p);
993
  defsubr (&Sx_mouse_events);
993
  defsubr (&Sx_mouse_events);
994
  defsubr (&Sx_proc_mouse_event);
994
  defsubr (&Sx_proc_mouse_event);
Lines 1012-1018 Link Here
1012
#ifdef notdef
1012
#ifdef notdef
1013
  defsubr (&Sx_rebind_key);
1013
  defsubr (&Sx_rebind_key);
1014
  defsubr (&Sx_rebind_keys);
1014
  defsubr (&Sx_rebind_keys);
1015
#endif notdef
1015
#endif
1016
  defsubr (&Sx_debug);
1016
  defsubr (&Sx_debug);
1017
}
1017
}
1018
1018
(-)emacs-18.59-orig/src/x11term.c (-2 / +5 lines)
Line 33 Link Here
33
#endif	lint
33
#endif
Lines 1482-1487 Link Here
1482
	  strcpy(mapping_buf,"\016");
1482
	  strcpy(mapping_buf,"\016");
1483
	  nbytes = 1;
1483
	  nbytes = 1;
1484
	  break;
1484
	  break;
1485
	case XK_BackSpace:
1486
	  strcpy(mapping_buf,"\177");
1487
	  nbytes = 1;
1488
	  break;
1485
	}
1489
	}
1486
#ifndef AIX
1490
#ifndef AIX
1487
      }
1491
      }
Lines 1715-1721 Link Here
1715
1719
1716
	extern char *getenv ();
1720
	extern char *getenv ();
1717
	extern XTinterrupt_signal ();
1721
	extern XTinterrupt_signal ();
1718
	extern char *malloc ();
1719
	extern Lisp_Object Vxterm, Vxterm1, Qt;
1722
	extern Lisp_Object Vxterm, Vxterm1, Qt;
1720
	extern int XIgnoreError();
1723
	extern int XIgnoreError();
1721
	int  ix;
1724
	int  ix;
(-)emacs-18.59-orig/src/xdisp.c (-1 / +1 lines)
Lines 2107-2113 Link Here
2107
  Lisp_Object root_window;
2107
  Lisp_Object root_window;
2108
#ifndef COMPILER_REGISTER_BUG
2108
#ifndef COMPILER_REGISTER_BUG
2109
  register
2109
  register
2110
#endif COMPILER_REGISTER_BUG
2110
#endif
2111
    struct window *mini_w;
2111
    struct window *mini_w;
2112
2112
2113
  this_line_bufpos = 0;
2113
  this_line_bufpos = 0;
(-)emacs-18.59-orig/etc/ChangeLog (+8 lines)
Lines 1-3 Link Here
1
2007-01-29  Ulrich Mueller  <ulm@kph.uni-mainz.de>
2
3
	* emacsclient.c, server.c: Check for HAVE_SOCKETS instead of BSD.
4
5
	* cvtmail.c, emacsclient.c, env.c, etags.c, fakemail.c,
6
	make-docfile.c, movemail.c, server.c, sorted-doc.c,
7
	test-distrib.c, wakeup.c, yow.c: Fix GCC 4.1 compilation issues.
8
1
1998-05-30  Noah Friedman  <friedman@splode.com>
9
1998-05-30  Noah Friedman  <friedman@splode.com>
2
10
3
	* env.c (main): Declare sys_errlist if linux + glibc2.
11
	* env.c (main): Declare sys_errlist if linux + glibc2.
(-)emacs-18.59-orig/etc/cvtmail.c (-4 / +7 lines)
Lines 36-42 Link Here
36
36
37
37
38
#include <stdio.h>
38
#include <stdio.h>
39
#include <stdlib.h>
40
#include <string.h>
39
41
42
void *xmalloc(), *xrealloc();
40
43
41
main (argc, argv)
44
main (argc, argv)
42
     int argc;
45
     int argc;
Lines 109-130 Link Here
109
    ;
112
    ;
110
}
113
}
111
114
112
int
115
void *
113
xmalloc (size)
116
xmalloc (size)
114
     int size;
117
     int size;
115
{
118
{
116
  int result = malloc (size);
119
  void *result = malloc (size);
117
  if (!result)
120
  if (!result)
118
    fatal ("virtual memory exhausted", 0);
121
    fatal ("virtual memory exhausted", 0);
119
  return result;
122
  return result;
120
}
123
}
121
124
122
int
125
void *
123
xrealloc (ptr, size)
126
xrealloc (ptr, size)
124
     char *ptr;
127
     char *ptr;
125
     int size;
128
     int size;
126
{
129
{
127
  int result = realloc (ptr, size);
130
  void *result = realloc (ptr, size);
128
  if (!result)
131
  if (!result)
129
    fatal ("virtual memory exhausted");
132
    fatal ("virtual memory exhausted");
130
  return result;
133
  return result;
(-)emacs-18.59-orig/etc/emacsclient.c (-11 / +12 lines)
Lines 27-34 Link Here
27
#undef close
27
#undef close
28
#endif
28
#endif
29
29
30
#include <stdlib.h>
31
#include <string.h>
30
32
31
#if !defined(BSD) && !defined(HAVE_SYSVIPC)
33
#if !defined(HAVE_SOCKETS) && !defined(HAVE_SYSVIPC)
32
#include <stdio.h>
34
#include <stdio.h>
33
35
34
main (argc, argv)
36
main (argc, argv)
Lines 41-49 Link Here
41
  exit (1);
43
  exit (1);
42
}
44
}
43
45
44
#else /* BSD or HAVE_SYSVIPC */
46
#else /* HAVE_SOCKETS or HAVE_SYSVIPC */
45
47
46
#if defined(BSD) && ! defined (HAVE_SYSVIPC)
48
#if defined(HAVE_SOCKETS)
47
/* BSD code is very different from SYSV IPC code */
49
/* BSD code is very different from SYSV IPC code */
48
50
49
#include <sys/types.h>
51
#include <sys/types.h>
Lines 51-60 Link Here
51
#include <sys/un.h>
53
#include <sys/un.h>
52
#include <stdio.h>
54
#include <stdio.h>
53
#include <errno.h>
55
#include <errno.h>
56
#include <unistd.h>
54
#include <sys/stat.h>
57
#include <sys/stat.h>
55
58
56
extern int sys_nerr;
59
extern int sys_nerr;
57
extern char *sys_errlist[];
58
extern int errno;
60
extern int errno;
59
61
60
main (argc, argv)
62
main (argc, argv)
Lines 69-76 Link Here
69
  char string[BUFSIZ];
71
  char string[BUFSIZ];
70
  struct stat statbfr;
72
  struct stat statbfr;
71
73
72
  char *getenv (), *getwd ();
73
74
  if (argc < 2)
74
  if (argc < 2)
75
    {
75
    {
76
      fprintf (stderr, "Usage: %s filename\n", argv[0]);
76
      fprintf (stderr, "Usage: %s filename\n", argv[0]);
Lines 112-118 Link Here
112
  strcat (server.sun_path, "/.emacs_server");
112
  strcat (server.sun_path, "/.emacs_server");
113
#endif
113
#endif
114
114
115
  if (connect (s, &server, strlen (server.sun_path) + 2) < 0)
115
  if (connect (s, (struct sockaddr *)&server,
116
	       strlen (server.sun_path) + 2) < 0)
116
    {
117
    {
117
      fprintf (stderr, "%s: ", argv[0]);
118
      fprintf (stderr, "%s: ", argv[0]);
118
      perror ("connect");
119
      perror ("connect");
Lines 125-135 Link Here
125
      exit (1);
126
      exit (1);
126
    }
127
    }
127
128
128
  cwd = getwd (string);
129
  cwd = getcwd (string, sizeof string);
129
  if (cwd == 0)
130
  if (cwd == 0)
130
    {
131
    {
131
      /* getwd puts message in STRING if it fails.  */
132
      fprintf (stderr, "%s: %s (%s)\n", argv[0],
132
      fprintf (stderr, "%s: %s (%s)\n", argv[0], string,
133
	       "Cannot get current working directory",
133
	       (errno < sys_nerr) ? sys_errlist[errno] : "unknown error");
134
	       (errno < sys_nerr) ? sys_errlist[errno] : "unknown error");
134
      exit (1);
135
      exit (1);
135
    }
136
    }
Lines 275-278 Link Here
275
276
276
#endif /* HAVE_SYSVIPC */
277
#endif /* HAVE_SYSVIPC */
277
278
278
#endif /* BSD or HAVE_SYSVIPC */
279
#endif /* HAVE_SOCKETS or HAVE_SYSVIPC */
(-)emacs-18.59-orig/etc/env.c (-8 / +8 lines)
Lines 89-94 Link Here
89
89
90
#include <stdio.h>
90
#include <stdio.h>
91
#include <errno.h>
91
#include <errno.h>
92
#include <stdlib.h>
93
#include <string.h>
92
94
93
extern int execvp ();
95
extern int execvp ();
94
extern char *index ();
96
extern char *index ();
Lines 102-108 Link Here
102
int nenv_size;
104
int nenv_size;
103
105
104
char *progname;
106
char *progname;
105
void setenv ();
107
void xsetenv ();
106
void fatal ();
108
void fatal ();
107
109
108
main (argc, argv, envp)
110
main (argc, argv, envp)
Lines 134-140 Link Here
134
	if (tem)
136
	if (tem)
135
	  {
137
	  {
136
	    *tem = '\000';
138
	    *tem = '\000';
137
	    setenv (*envp, tem + 1);
139
	    xsetenv (*envp, tem + 1);
138
	  }
140
	  }
139
     }
141
     }
140
142
Lines 145-151 Link Here
145
	/* If arg contains a "=" it specifies to set a variable */
147
	/* If arg contains a "=" it specifies to set a variable */
146
	{
148
	{
147
	  *tem = '\000';
149
	  *tem = '\000';
148
	  setenv (*argv, tem + 1);
150
	  xsetenv (*argv, tem + 1);
149
	  argc--; argv++;
151
	  argc--; argv++;
150
	  continue;
152
	  continue;
151
	}
153
	}
Lines 161-167 Link Here
161
	/* Unset a variable */
163
	/* Unset a variable */
162
	{
164
	{
163
	  argc--; argv++;
165
	  argc--; argv++;
164
	  setenv (*argv, 0);
166
	  xsetenv (*argv, 0);
165
	  argc--; argv++;
167
	  argc--; argv++;
166
	}
168
	}
167
      else if (!strcmp (*argv, "-s") ||
169
      else if (!strcmp (*argv, "-s") ||
Lines 174-180 Link Here
174
	    fatal ("No value specified for variable \"%s\"",
176
	    fatal ("No value specified for variable \"%s\"",
175
		   tem);
177
		   tem);
176
	  argc--; argv++;
178
	  argc--; argv++;
177
	  setenv (tem, *argv);
179
	  xsetenv (tem, *argv);
178
	  argc--; argv++;
180
	  argc--; argv++;
179
	}
181
	}
180
      else if (!strcmp (*argv, "-") || !strcmp (*argv, "--"))
182
      else if (!strcmp (*argv, "-") || !strcmp (*argv, "--"))
Lines 216-222 Link Here
216
}
218
}
217
219
218
void
220
void
219
setenv (var, val)
221
xsetenv (var, val)
220
  register char *var, *val;
222
  register char *var, *val;
221
{
223
{
222
  register char **e;
224
  register char **e;
Lines 274-281 Link Here
274
}
276
}
275
277
276
278
277
extern char *malloc (), *realloc ();
278
279
void
279
void
280
memory_fatal ()
280
memory_fatal ()
281
{
281
{
(-)emacs-18.59-orig/etc/etags.c (-48 / +7 lines)
Lines 21-26 Link Here
21
21
22
#include <stdio.h>
22
#include <stdio.h>
23
#include <ctype.h>
23
#include <ctype.h>
24
#include <stdlib.h>
25
#include <string.h>
24
26
25
/* Define the symbol ETAGS to make the program "etags",
27
/* Define the symbol ETAGS to make the program "etags",
26
 which makes emacs-style tag tables by default.
28
 which makes emacs-style tag tables by default.
Lines 128-138 Link Here
128
130
129
char *savestr();
131
char *savestr();
130
char *savenstr ();
132
char *savenstr ();
131
char *rindex();
132
char *index();
133
char *concat ();
133
char *concat ();
134
void initbuffer ();
134
void initbuffer ();
135
long readline ();
135
long readline ();
136
void *xmalloc(), *xrealloc();
136
137
137
/* A `struct linebuffer' is a structure which holds a line of text.
138
/* A `struct linebuffer' is a structure which holds a line of text.
138
 `readline' reads a line from a stream into a linebuffer
139
 `readline' reads a line from a stream into a linebuffer
Lines 1380-1386 Link Here
1380
     char *defenv;
1381
     char *defenv;
1381
{
1382
{
1382
  register char *env, *p;
1383
  register char *env, *p;
1383
  extern char *savenstr (), *index ();
1384
1384
1385
  struct TEX_tabent *tab;
1385
  struct TEX_tabent *tab;
1386
  int size, i;
1386
  int size, i;
Lines 1530-1576 Link Here
1530
  return dp;
1530
  return dp;
1531
}
1531
}
1532
1532
1533
/*
1534
 * Return the ptr in sp at which the character c last
1535
 * appears; NULL if not found
1536
 *
1537
 * Identical to v7 rindex, included for portability.
1538
 */
1539
1540
char *
1541
rindex(sp, c)
1542
     register char *sp, c;
1543
{
1544
  register char *r;
1545
1546
  r = NULL;
1547
  do
1548
    {
1549
      if (*sp == c)
1550
	r = sp;
1551
    } while (*sp++);
1552
  return(r);
1553
}
1554
1555
/*
1556
 * Return the ptr in sp at which the character c first
1557
 * appears; NULL if not found
1558
 *
1559
 * Identical to v7 index, included for portability.
1560
 */
1561
1562
char *
1563
index(sp, c)
1564
     register char *sp, c;
1565
{
1566
  do
1567
    {
1568
      if (*sp == c)
1569
	return (sp);
1570
    } while (*sp++);
1571
  return (NULL);
1572
}
1573
1574
/* Print error message and exit.  */
1533
/* Print error message and exit.  */
1575
1534
1576
fatal (s1, s2)
1535
fatal (s1, s2)
Lines 1609-1630 Link Here
1609
1568
1610
/* Like malloc but get fatal error if memory is exhausted.  */
1569
/* Like malloc but get fatal error if memory is exhausted.  */
1611
1570
1612
int
1571
void *
1613
xmalloc (size)
1572
xmalloc (size)
1614
     int size;
1573
     int size;
1615
{
1574
{
1616
  int result = malloc (size);
1575
  void *result = malloc (size);
1617
  if (!result)
1576
  if (!result)
1618
    fatal ("virtual memory exhausted", 0);
1577
    fatal ("virtual memory exhausted", 0);
1619
  return result;
1578
  return result;
1620
}
1579
}
1621
1580
1622
int
1581
void *
1623
xrealloc (ptr, size)
1582
xrealloc (ptr, size)
1624
     char *ptr;
1583
     char *ptr;
1625
     int size;
1584
     int size;
1626
{
1585
{
1627
  int result = realloc (ptr, size);
1586
  void *result = realloc (ptr, size);
1628
  if (!result)
1587
  if (!result)
1629
    fatal ("virtual memory exhausted");
1588
    fatal ("virtual memory exhausted");
1630
  return result;
1589
  return result;
(-)emacs-18.59-orig/etc/fakemail.c (-10 / +2 lines)
Lines 43-48 Link Here
43
#endif
43
#endif
44
44
45
#include <stdio.h>
45
#include <stdio.h>
46
#include <stdlib.h>
46
#include <string.h>
47
#include <string.h>
47
#include <ctype.h>
48
#include <ctype.h>
48
#include <time.h>
49
#include <time.h>
Lines 123-138 Link Here
123
124
124
extern FILE *popen ();
125
extern FILE *popen ();
125
extern int fclose (), pclose ();
126
extern int fclose (), pclose ();
126
extern char *malloc (), *realloc ();
127
127
128
#ifdef CURRENT_USER
128
#define cuserid(s) (getpwuid (geteuid ())->pw_name)
129
extern struct passwd *getpwuid ();
130
extern unsigned short geteuid ();
131
static struct passwd *my_entry;
132
#define cuserid(s)				\
133
(my_entry = getpwuid (((int) geteuid ())),	\
134
 my_entry->pw_name)
135
#endif
136
129
137
/* Utilities */
130
/* Utilities */
138
131
Lines 564-570 Link Here
564
  return;
557
  return;
565
}
558
}
566
559
567
void
568
main (argc, argv)
560
main (argc, argv)
569
     int argc;
561
     int argc;
570
     char **argv;
562
     char **argv;
(-)emacs-18.59-orig/etc/make-docfile.c (+2 lines)
Lines 32-37 Link Here
32
 */
32
 */
33
33
34
#include <stdio.h>
34
#include <stdio.h>
35
#include <stdlib.h>
36
#include <string.h>
35
37
36
FILE *outfile;
38
FILE *outfile;
37
39
(-)emacs-18.59-orig/etc/movemail.c (-5 / +6 lines)
Lines 52-57 Link Here
52
#include <sys/stat.h>
52
#include <sys/stat.h>
53
#include <sys/file.h>
53
#include <sys/file.h>
54
#include <errno.h>
54
#include <errno.h>
55
#include <stdio.h>
56
#include <stdlib.h>
57
#include <string.h>
55
#define NO_SHORTNAMES   /* Tell config not to load remap.h */
58
#define NO_SHORTNAMES   /* Tell config not to load remap.h */
56
#include "../src/config.h"
59
#include "../src/config.h"
57
60
Lines 81-86 Link Here
81
#undef close
84
#undef close
82
85
83
char *concat ();
86
char *concat ();
87
void *xmalloc ();
84
extern int errno;
88
extern int errno;
85
89
86
/* Nonzero means this is name of a lock file to delete on fatal error.  */
90
/* Nonzero means this is name of a lock file to delete on fatal error.  */
Lines 320-326 Link Here
320
     char *name;
324
     char *name;
321
{
325
{
322
  extern int errno, sys_nerr;
326
  extern int errno, sys_nerr;
323
  extern char *sys_errlist[];
324
  char *s;
327
  char *s;
325
328
326
  if (errno < sys_nerr)
329
  if (errno < sys_nerr)
Lines 334-340 Link Here
334
     char *name;
337
     char *name;
335
{
338
{
336
  extern int errno, sys_nerr;
339
  extern int errno, sys_nerr;
337
  extern char *sys_errlist[];
338
  char *s;
340
  char *s;
339
341
340
  if (errno < sys_nerr)
342
  if (errno < sys_nerr)
Lines 365-375 Link Here
365
367
366
/* Like malloc but get fatal error if memory is exhausted.  */
368
/* Like malloc but get fatal error if memory is exhausted.  */
367
369
368
int
370
void *
369
xmalloc (size)
371
xmalloc (size)
370
     int size;
372
     int size;
371
{
373
{
372
  int result = malloc (size);
374
  void *result = malloc (size);
373
  if (!result)
375
  if (!result)
374
    fatal ("virtual memory exhausted", 0);
376
    fatal ("virtual memory exhausted", 0);
375
  return result;
377
  return result;
Lines 704-710 Link Here
704
get_errmsg ()
706
get_errmsg ()
705
{
707
{
706
  extern int errno, sys_nerr;
708
  extern int errno, sys_nerr;
707
  extern char *sys_errlist[];
708
  char *s;
709
  char *s;
709
710
710
  if (errno < sys_nerr)
711
  if (errno < sys_nerr)
(-)emacs-18.59-orig/etc/server.c (-11 / +16 lines)
Lines 36-43 Link Here
36
#undef open
36
#undef open
37
#undef close
37
#undef close
38
38
39
#include <stdlib.h>
40
#include <string.h>
39
41
40
#if !defined(BSD) && !defined(HAVE_SYSVIPC)
42
#if !defined(HAVE_SOCKETS) && !defined(HAVE_SYSVIPC)
41
#include <stdio.h>
43
#include <stdio.h>
42
44
43
main ()
45
main ()
Lines 47-55 Link Here
47
  exit (1);
49
  exit (1);
48
}
50
}
49
51
50
#else /* BSD or HAVE_SYSVIPC */
52
#else /* HAVE_SOCKETS or HAVE_SYSVIPC */
51
53
52
#if defined (BSD) && ! defined (HAVE_SYSVIPC)
54
#if defined (HAVE_SOCKETS)
53
/* BSD code is very different from SYSV IPC code */
55
/* BSD code is very different from SYSV IPC code */
54
56
55
#include <sys/file.h>
57
#include <sys/file.h>
Lines 110-116 Link Here
110
  unlink (server.sun_path);
112
  unlink (server.sun_path);
111
#endif
113
#endif
112
114
113
  if (bind (s, &server, strlen (server.sun_path) + 2) < 0)
115
  if (bind (s, (struct sockaddr *)&server, strlen (server.sun_path) + 2) < 0)
114
    {
116
    {
115
      perror ("bind");
117
      perror ("bind");
116
      exit (1);
118
      exit (1);
Lines 128-141 Link Here
128
  signal (SIGPIPE, SIG_IGN);
130
  signal (SIGPIPE, SIG_IGN);
129
  for (;;)
131
  for (;;)
130
    {
132
    {
131
      int rmask = (1 << s) + 1;
133
      fd_set rmask;
134
      FD_ZERO (&rmask);
135
      FD_SET (0, &rmask);
136
      FD_SET (s, &rmask);
132
      if (select (s + 1, &rmask, 0, 0, 0) < 0)
137
      if (select (s + 1, &rmask, 0, 0, 0) < 0)
133
	perror ("select");
138
	perror ("select");
134
      if (rmask & (1 << s))	/* client sends list of filenames */
139
      if (FD_ISSET (s, &rmask))	/* client sends list of filenames */
135
	{
140
	{
136
	  fromlen = sizeof (fromunix);
141
	  fromlen = sizeof (fromunix);
137
	  fromunix.sun_family = AF_UNIX;
142
	  fromunix.sun_family = AF_UNIX;
138
	  infd = accept (s, &fromunix, &fromlen); /* open socket fd */
143
	  infd = accept (s, (struct sockaddr *)&fromunix, &fromlen);
144
				/* open socket fd */
139
	  if (infd < 0)
145
	  if (infd < 0)
140
	    {
146
	    {
141
	      if (errno == EMFILE || errno == ENFILE)
147
	      if (errno == EMFILE || errno == ENFILE)
Lines 184-190 Link Here
184
	  fflush (infile);
190
	  fflush (infile);
185
	  continue;
191
	  continue;
186
	}
192
	}
187
      else if (rmask & 1) /* emacs sends codeword, fd, and string message */
193
      else if (FD_ISSET (0, &rmask))
194
			/* emacs sends codeword, fd, and string message */
188
	{
195
	{
189
	  /* Read command codeword and fd */
196
	  /* Read command codeword and fd */
190
	  clearerr (stdin);
197
	  clearerr (stdin);
Lines 325-330 Link Here
325
332
326
#endif /* SYSV IPC */
333
#endif /* SYSV IPC */
327
334
328
#endif /* BSD && IPC */
335
#endif /* HAVE_SOCKETS && IPC */
329
330
(-)emacs-18.59-orig/etc/sorted-doc.c (-1 / +2 lines)
Lines 7-14 Link Here
7
7
8
#include <stdio.h>
8
#include <stdio.h>
9
#include <ctype.h>
9
#include <ctype.h>
10
#include <stdlib.h>
11
#include <string.h>
10
12
11
extern char *malloc ();
12
char *xmalloc ();
13
char *xmalloc ();
13
14
14
#define NUL	'\0'
15
#define NUL	'\0'
(-)emacs-18.59-orig/etc/test-distrib.c (+1 lines)
Lines 1-4 Link Here
1
#include <stdio.h>
1
#include <stdio.h>
2
#include <stdlib.h>
2
3
3
/* Break string in two parts to avoid buggy C compilers that ignore characters
4
/* Break string in two parts to avoid buggy C compilers that ignore characters
4
   after nulls in strings.  */
5
   after nulls in strings.  */
(-)emacs-18.59-orig/etc/wakeup.c (+1 lines)
Lines 2-7 Link Here
2
2
3
#include <stdio.h>
3
#include <stdio.h>
4
#include <time.h>
4
#include <time.h>
5
#include <stdlib.h>
5
6
6
struct tm *localtime ();
7
struct tm *localtime ();
7
8
(-)emacs-18.59-orig/etc/yow.c (+2 lines)
Lines 1-5 Link Here
1
#include <stdio.h>
1
#include <stdio.h>
2
#include <ctype.h>
2
#include <ctype.h>
3
#include <stdlib.h>
4
#include <string.h>
3
#include "../src/paths.h"
5
#include "../src/paths.h"
4
6
5
/* zippy.c
7
/* zippy.c

Return to bug 44766