dealing with obsolete variables.
* fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional.
(main): Replace MAIL_PROGRAM_NAME with its value.
* src/Makefile.in:
* src/emacs.c:
* src/gmalloc.c:
* src/keyboard.c:
* src/lisp.h:
* src/m/ibm370aix.h:
* src/process.c:
* src/regex.c:
* src/s/hpux.h:
* src/sysdep.c:
* src/sysselect.h:
* src/systty.h:
* src/unexec.c:
* src/w32term.c:
* src/xsmfns.c:
* src/xterm.c: Remove code that deals with obsolete variables.
* s/msdos.h (DONT_NEED_ENVIRON): Don't define.
* ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test,
nothing else needs it anymore.
+2008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code
+ dealing with obsolete variables.
+
2008-02-08 Glenn Morris <rgm@gnu.org>
* Makefile.in (check-info-dir): New target.
REL_ALLOC Compile in the relocatable memory allocator ralloc.c.
SYSTEM_MALLOC Use the system library's malloc.
-** All references to these symbols should be removed, all their definitions are gone **
-
-NU
-romp
+** Replace, the definition is trivial: SWITCH_ENUM_CAST
** Temporarily put defines from removed files here, check if these macros need to be documented or removed because they are not used anymore. **
-ABORT_RETURN_TYPE
ADDR_CORRECT
-ADJUST_EXEC_HEADER
ADJUST_TEXTBASE
ADJUST_TEXT_SCNHDR_SIZE
A_TEXT_OFFSET
A_TEXT_SEEK
BAUD_CONVERT
BROKEN_FIONREAD
-BROKEN_SELECT_NON_X
BROKEN_SIGIO
BROKEN_TIOCGETC
BROKEN_TIOCGWINSZ
CLASH_DETECTION
COFF
COFF_BSD_SYMBOLS
-CRT0_COMPILE
CRT0_DUMMIES
C_DEBUG_SWITCH
C_OPTIMIZE_SWITCH
-C_SWITCH_ASM
C_SWITCH_MACHINE
C_SWITCH_SYSTEM
DATA_END
DEBUG
DECLARE_GETPWUID_WITH_UID_T
DEFAULT_ENTRY_ADDRESS
-DONT_NEED_ENVIRON
DOT_GLOBAL_START
DUMMIES
-EEOF
ELF
-EXEC_HDR_TYPE
-EXEC_MAGIC
EXEC_PAGESIZE
EXPLICIT_SIGN_EXTEND
-EXTRA_INITIALIZE
FIRST_PTY_LETTER
-FREE_RETURN_TYPE
FSCALE
-F_SETOWN_BUG
-F_SETOWN_SOCK_NEG
GC_MARK_STACK
GC_SETJMP_WORKS
GETPGRP_NO_ARG
GNU_MALLOC
HAVE_ALLOCA
-HAVE_BROKEN_INET_ADDR
HAVE_CLOSEDIR
HAVE_CONFIG_H
HAVE_CRTN
HAVE_UTIMES
HAVE_WAIT_HEADER
HAVE_X11R6
-HAVE_XFREE386
HAVE_XSCREENNUMBEROFSCREEN
HAVE_X_WINDOWS
-HEADER_INCL_IN_TEXT
-IBMAIX
INHIBIT_X11R6_XIM
-INIT_BAUD_RATE
INTEL386
INTERRUPT_INPUT
-IN_UNEXEC
IRIS
IRIS_4D
IRIX6_5
IRIX_FORCE_32_BITS
-KEEP_OLD_PADDR
-KEEP_OLD_TEXT_SCNPTR
KERNEL_FILE
LDAV_SYMBOL
LD_SWITCH_MACHINE
LD_SWITCH_SYSTEM
LD_SWITCH_SYSTEM_TEMACS
-LD_TEXT_START_ADDR
LIBS_DEBUG
LIBS_MACHINE
LIBS_SYSTEM
LIBS_TERMCAP
-LIBX11_MACHINE
LIBX11_SYSTEM
LIBXMU
LIB_GCC
LINKER
LOAD_AVE_CVT
LOAD_AVE_TYPE
-L_SET
-MAIL_PROGRAM_NAME
MAIL_USE_FLOCK
-MAXNAMLEN
-MEMMOVE_MISSING
-MEMORY_IN_STRING_H
MKDIR_PROTOTYPE
MOTIF
NARROWPROTO
NEED_ERRNO
-NEED_NET_ERRNO_H
NEED_PTEM_H
NEED_SIOCTL
-NEW_PROGRAM_H
-NEW_SECTION_H
-NLIST_NAME_UNION
NLIST_STRUCT
NOMULTIPLEJOBS
NONSYSTEM_DIR_LIBRARY
NOT_C_CODE
NO_ARG_ARRAY
-NO_GET_LOAD_AVG
NO_MODE_T
-NO_PTY_H
NO_REMAP
NO_SIOCTL_H
-NO_SOCKETS_IN_FILE_SYSTEM
NO_SOCK_SIGIO
NO_TERMIO
NO_UNION_TYPE
-NO_UNION_TYPE
NSIG
NSIG_MINIMUM
OBJECTS_MACHINE
ORDINARY_LINK
-OSF1
O_NDELAY
-PATCH_INDEX
PENDING_OUTPUT_COUNT
PERROR
PNTR_COMPARISON_TYPE
SEGSIZ
SETUP_SLAVE_PTY
SHORTNAMES
-SHORT_CAST_BUG
SIGMASKTYPE
SIGNALS_VIA_CHARACTERS
SIGN_EXTEND_CHAR
SIGTYPE
-SIG_BLOCK
-SKTPAIR
-SMAIL
START_FILES
-SUNOS4
-SUNOS_LOCALTIME_BUG
SVR4
-SWITCH_ENUM_BUG
-SYMS_START
SYSTEM_MALLOC
SYSTEM_TYPE
SYSV_PTYS
TERMINFO
TEXT_END
TEXT_START
-TEXT_START_ADDR
THIS_IS_MAKEFILE
-TPIX
ULIMIT_BREAK_VALUE
UNEXEC
-USE_DL_STUBS
-USE_GETOBAUD
USE_MMAP_FOR_BUFFERS
-USE_NONANSI_DEFUN
USG
USG5
USG5_3
VIRT_ADDR_VARIES
WORDS_BIG_ENDIAN
WORD_MACHINE
-WRITE
-X11R4
-XICCC
XINT
XSET
XUINT
_ABIN32
_MIPS_SZLONG
_POSIX_SOURCE
-__main
_longjmp
_setjmp
-_sobuf
-aix386
alloca
-aouthdr
data_start
drem
-dsize
emacs
entry
etext
fatal
fchmod
getpgrp
-ghs
hp9000s800
index
-internal_with_output_to_temp_buffer
jmp_buf
longjmp
m68000
#define LIB_X11_LIB -lX11
#endif
-#ifndef LIBX11_MACHINE
-#define LIBX11_MACHINE
-#endif
-
#ifndef LIBX11_SYSTEM
#define LIBX11_SYSTEM
#endif
-configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
+configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
#ifdef UNEXEC
configure___ unexec=UNEXEC
AC_CHECK_LIB(pthreads, cma_open)
-AC_MSG_CHECKING(for XFree86 in /usr/X386)
-if test -d /usr/X386/include; then
- HAVE_XFREE386=yes
- : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
-else
- HAVE_XFREE386=no
-fi
-AC_MSG_RESULT($HAVE_XFREE386)
-
dnl Check for need for bigtoc support on IBM AIX
case ${host_os} in
[Define to 1 if you want to use version 11 of X windows.
Otherwise, Emacs expects to use version 10.])
fi
-if test "${HAVE_XFREE386}" = "yes" ; then
- AC_DEFINE(HAVE_XFREE386, 1, [Define to 1 if you're using XFree386.])
-fi
if test "${HAVE_MENUS}" = "yes" ; then
AC_DEFINE(HAVE_MENUS, 1,
[Define to 1 if you have mouse menus.
2008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
+ * fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional.
+ (main): Replace MAIL_PROGRAM_NAME with its value.
+
* Makefile.in (REGEXP_IN_LIBC): Remove reference to obsolete
variable.
#define NIL ((line_list) NULL)
#define INITIAL_LINE_SIZE 200
-#ifndef MAIL_PROGRAM_NAME
-#define MAIL_PROGRAM_NAME "/bin/mail"
-#endif
-
static char *my_name;
static char *the_date;
static char *the_user;
mail_program_name = getenv ("FAKEMAILER");
if (!(mail_program_name && *mail_program_name))
- mail_program_name = MAIL_PROGRAM_NAME;
+ mail_program_name = "/bin/mail";
name_length = strlen (mail_program_name);
my_name = MY_NAME;
+2008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * src/Makefile.in:
+ * src/emacs.c:
+ * src/gmalloc.c:
+ * src/keyboard.c:
+ * src/lisp.h:
+ * src/m/ibm370aix.h:
+ * src/process.c:
+ * src/regex.c:
+ * src/s/hpux.h:
+ * src/sysdep.c:
+ * src/sysselect.h:
+ * src/systty.h:
+ * src/unexec.c:
+ * src/w32term.c:
+ * src/xsmfns.c:
+ * src/xterm.c: Remove code that deals with obsolete variables.
+
+ * s/msdos.h (DONT_NEED_ENVIRON): Don't define.
+
+ * ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test,
+ nothing else needs it anymore.
+
2008-02-09 Eli Zaretskii <eliz@gnu.org>
* buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table
#ifndef ORDINARY_LINK
#ifndef CRT0_COMPILE
-#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
+#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
#endif
#ifndef START_FILES
#endif /* not ORDINARY_LINK */
-/* cc switches needed to make ``asm'' keyword work.
- Nothing special needed on most machines. */
-#ifndef C_SWITCH_ASM
-#define C_SWITCH_ASM
-#endif
-
#if HAVE_GTK
#define USE_GTK
TOOLKIT_DEFINES = -DUSE_GTK
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
-#ifndef LIBX11_MACHINE
-#define LIBX11_MACHINE
-#endif
-
#ifndef LIBX11_SYSTEM
#define LIBX11_SYSTEM
#endif
/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
options for where to find X libraries, but before those libraries. */
X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
-LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM $(XFT_LIBS)
+LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS)
#else /* not HAVE_X11 */
LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
#endif /* not HAVE_X11 */
#endif /* not __GNUC__ */
#endif /* not ORDINARY_LINK */
-/* Specify address for ld to start loading at,
- if requested by configuration. */
-#ifdef LD_TEXT_START_ADDR
-STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
-#endif
-
#ifdef ORDINARY_LINK
LD = $(CC)
#else
int errno;
#endif
-#ifndef DONT_NEED_ENVIRON
+#ifndef MSDOS
char **environ;
#endif
#if ! defined (DOS_NT) && ! defined (NO_ABORT)
-#ifndef ABORT_RETURN_TYPE
-#define ABORT_RETURN_TYPE void
-#endif
-
-ABORT_RETURN_TYPE
+void
abort ()
{
kill (getpid (), SIGABRT);
if (do_initial_setlocale)
setlocale (LC_ALL, "");
-#ifdef EXTRA_INITIALIZE
- EXTRA_INITIALIZE;
-#endif
-
inhibit_window_system = 0;
/* Handle the -t switch, which specifies filename to use as terminal. */
#define NULL 0
#endif
-#ifndef FREE_RETURN_TYPE
-#define FREE_RETURN_TYPE void
-#endif
-
/* Allocate SIZE bytes of memory. */
extern __ptr_t malloc PP ((__malloc_size_t __size));
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
extern __ptr_t calloc PP ((__malloc_size_t __nmemb, __malloc_size_t __size));
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
-extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr));
+extern void free PP ((__ptr_t __ptr));
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
#if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */
if (size < sizeof (struct list))
size = sizeof (struct list);
-#ifdef SUNOS_LOCALTIME_BUG
- if (size < 16)
- size = 16;
-#endif
-
/* Determine the allocation policy based on the request size. */
if (size <= BLOCKSIZE / 2)
{
/* Cope with systems lacking `memmove'. */
#ifndef memmove
-#if (defined (MEMMOVE_MISSING) || \
- !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
+#if (!defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
#ifdef emacs
#undef __malloc_safe_bcopy
#define __malloc_safe_bcopy safe_bcopy
/* Return memory to the heap. */
-FREE_RETURN_TYPE
+void
free (ptr)
__ptr_t ptr;
{
/* Cope with systems lacking `memmove'. */
-#if (defined (MEMMOVE_MISSING) || \
- !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
+#if (!defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
#ifdef emacs
#undef __malloc_safe_bcopy
Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
if (nread == -1 && errno == EIO)
return -2; /* Close this terminal. */
-#if defined (AIX) && (! defined (aix386) && defined (_BSD))
+#if defined (AIX) && defined (_BSD)
/* The kernel sometimes fails to deliver SIGHUP for ptys.
This looks incorrect, but it isn't, because _BSD causes
O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
A null string means call interactively with no arguments.
`doc' is documentation for the user. */
-#if (!defined (__STDC__) && !defined (PROTOTYPES)) \
- || defined (USE_NONANSI_DEFUN)
+#if (!defined (__STDC__) && !defined (PROTOTYPES))
#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \
Lisp_Object fnname (); \
\f
/* Declare a Lisp-callable function. The MAXARGS parameter has the same
meaning as in the DEFUN macro, and is used to construct a prototype. */
-#if (!defined (__STDC__) && !defined (PROTOTYPES)) \
- || defined (USE_NONANSI_DEFUN)
+#if (!defined (__STDC__) && !defined (PROTOTYPES))
#define EXFUN(fnname, maxargs) \
extern Lisp_Object fnname ()
#else
#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))
#endif
-#ifdef SWITCH_ENUM_BUG
-#define SWITCH_ENUM_CAST(x) ((int)(x))
-#else
#define SWITCH_ENUM_CAST(x) (x)
-#endif
/* Loop over Lisp list LIST. Signal an error if LIST is not a proper
list, or if it contains circles.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#include "ibmps2-aix.h"
-
#define AIX
/* Include unistd.h, even though we don't define POSIX. */
#define NEED_UNISTD_H
-/* these were defined in "ibmps2-aix.h" */
-#undef INTEL386
-#undef aix386
-
/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
is the most significant byte. */
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#ifdef NEED_NET_ERRNO_H
-#include <net/errno.h>
-#endif /* NEED_NET_ERRNO_H */
/* Are local (unix) sockets supported? */
-#if defined (HAVE_SYS_UN_H) && !defined (NO_SOCKETS_IN_FILE_SYSTEM)
+#if defined (HAVE_SYS_UN_H)
#if !defined (AF_LOCAL) && defined (AF_UNIX)
#define AF_LOCAL AF_UNIX
#endif
#include <client.h>
#endif
-/* On some systems, inet_addr returns a 'struct in_addr'. */
-#ifdef HAVE_BROKEN_INET_ADDR
-#define IN_ADDR struct in_addr
-#define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
-#else
-#define IN_ADDR unsigned long
-#define NUMERIC_ADDR_ERROR (numeric_addr == -1)
-#endif
-
#if defined(BSD_SYSTEM)
#include <sys/ioctl.h>
#if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5)
maybe other values to come. */
static Lisp_Object Vprocess_connection_type;
-#ifdef SKTPAIR
-#ifndef HAVE_SOCKETS
-#include <sys/socket.h>
-#endif
-#endif /* SKTPAIR */
-
/* These next two vars are non-static since sysdep.c uses them in the
emulation of `select'. */
/* Number of events of change of status of a process. */
}
else
#endif /* HAVE_PTYS */
-#ifdef SKTPAIR
- {
- if (socketpair (AF_UNIX, SOCK_STREAM, 0, sv) < 0)
- report_file_error ("Opening socketpair", Qnil);
- outchannel = inchannel = sv[0];
- forkout = forkin = sv[1];
- }
-#else /* not SKTPAIR */
{
int tem;
tem = pipe (sv);
outchannel = sv[1];
forkin = sv[0];
}
-#endif /* not SKTPAIR */
#if 0
/* Replaced by close_process_descs */
else
/* Attempt to interpret host as numeric inet address */
{
- IN_ADDR numeric_addr;
+ unsigned long numeric_addr;
numeric_addr = inet_addr ((char *) SDATA (host));
- if (NUMERIC_ADDR_ERROR)
+ if (numeric_addr == -1)
error ("Unknown host \"%s\"", SDATA (host));
bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr,
/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */
enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
-# ifdef SWITCH_ENUM_BUG
-# define SWITCH_ENUM_CAST(x) ((int)(x))
-# else
# define SWITCH_ENUM_CAST(x) (x)
-# endif
/* Dummy macros for non-Emacs environments. */
# define BASE_LEADING_CODE_P(c) (0)
{ 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200, \
1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 }
-/* This is needed for HPUX version 6.2; it may not be needed for 6.2.1. */
-#define SHORT_CAST_BUG
-
/* This is how to get the device name of the tty end of a pty. */
#define PTY_TTY_NAME_SPRINTF \
sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
/* command.com does not understand `...` so we define this. */
#define LIB_GCC -Lgcc
-#define DONT_NEED_ENVIRON
#define SEPCHAR ';'
#define NULL_DEVICE "nul"
#if defined (USG)
#include <sys/utsname.h>
-#ifndef MEMORY_IN_STRING_H
#include <memory.h>
-#endif
#if defined (TIOCGWINSZ)
#ifdef NEED_SIOCTL
#include <sys/sioctl.h>
emacs_ospeed = 0;
else
{
-#ifdef INIT_BAUD_RATE
- INIT_BAUD_RATE ();
-#else
#ifdef DOS_NT
emacs_ospeed = 15;
#else /* not DOS_NT */
sg.c_cflag = B9600;
tcgetattr (fd, &sg);
emacs_ospeed = cfgetospeed (&sg);
-#if defined (USE_GETOBAUD) && defined (getobaud)
- /* m88k-motorola-sysv3 needs this (ghazi@noc.rutgers.edu) 9/1/94. */
- if (emacs_ospeed == 0)
- emacs_ospeed = getobaud (sg.c_cflag);
-#endif
#else /* neither VMS nor TERMIOS */
#ifdef HAVE_TERMIO
struct termio sg;
#endif /* not HAVE_TERMIOS */
#endif /* not VMS */
#endif /* not DOS_NT */
-#endif /* not INIT_BAUD_RATE */
}
baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0]
int lmode;
#endif
-#ifndef F_SETOWN_BUG
#ifdef F_SETOWN
int old_fcntl_owner[MAXDESC];
#endif /* F_SETOWN */
-#endif /* F_SETOWN_BUG */
/* This may also be defined in stdio,
but if so, this does no harm,
#endif /* VMS */
#ifdef F_SETFL
-#ifndef F_SETOWN_BUG
#ifdef F_GETOWN /* F_SETFL does not imply existence of F_GETOWN */
if (interrupt_input)
{
#endif /* HAVE_GPM */
}
#endif /* F_GETOWN */
-#endif /* F_SETOWN_BUG */
#endif /* F_SETFL */
#ifdef BSD4_1
#endif
#ifdef F_SETFL
-#ifndef F_SETOWN_BUG
#ifdef F_SETOWN /* F_SETFL does not imply existence of F_SETOWN */
if (interrupt_input)
{
old_fcntl_owner[fileno (tty_out->input)]);
}
#endif /* F_SETOWN */
-#endif /* F_SETOWN_BUG */
#ifdef O_NDELAY
fcntl (fileno (tty_out->input), F_SETFL,
fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NDELAY);
\f
#ifndef MSDOS
#ifndef VMS
-#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
+#if !defined (HAVE_SELECT)
#include "sysselect.h"
#undef select
}
}
-#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
+#if !defined (HAVE_SELECT)
#define select sys_select
#endif
#endif /* AIXHFT */
-#ifdef USE_DL_STUBS
-
-/* These are included on Sunos 4.1 when we do not use shared libraries.
- X11 libraries may refer to these functions but (we hope) do not
- actually call them. */
-
-void *
-dlopen ()
-{
- return 0;
-}
-
-void *
-dlsym ()
-{
- return 0;
-}
-
-int
-dlclose ()
-{
- return -1;
-}
-
-#endif /* USE_DL_STUBS */
\f
#ifndef BSTRING
#define FD_ZERO(p) (*(p) = 0)
#endif /* no FD_SET */
-#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
+#if !defined (HAVE_SELECT)
#define select sys_select
#endif
#ifdef SYSV_PTYS
#include <sys/types.h>
#include <sys/tty.h>
-#ifndef NO_PTY_H
#include <sys/pty.h>
#endif
-#endif
\f
/* Special cases - inhibiting the use of certain features. */
If defined, this macro specifies the number of bytes to seek into the
a.out file before starting to write the text segment.
-* EXEC_MAGIC
-
-For machines using COFF, this macro, if defined, is a value stored
-into the magic number field of the output file.
-
* ADJUST_EXEC_HEADER
This macro can be used to generate statements to adjust or
#ifndef emacs
#define PERROR(arg) perror (arg); return -1
#else
-#define IN_UNEXEC
#include <config.h>
#define PERROR(file) report_error (file, new)
#endif
#define SYMS_START ((long) N_SYMOFF (ohdr))
-/* Some machines override the structure name for an a.out header. */
-#ifndef EXEC_HDR_TYPE
-#define EXEC_HDR_TYPE struct exec
-#endif
-
#ifdef HPUX
#ifdef HP9000S200_ID
#define MY_ID HP9000S200_ID
static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC};
#define N_TXTOFF(x) TEXT_OFFSET(x)
#define N_SYMOFF(x) LESYM_OFFSET(x)
-static EXEC_HDR_TYPE hdr, ohdr;
+static struct exec hdr, ohdr;
#else /* not HPUX */
-#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (GNU_LINUX)
+#if defined (USG) && !defined (IRIS) && !defined (GNU_LINUX)
static struct bhdr hdr, ohdr;
#define a_magic fmagic
#define a_text tsize
(((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\
((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
#define NEWMAGIC FMAGIC
-#else /* IRIS or IBMAIX or not USG */
-static EXEC_HDR_TYPE hdr, ohdr;
+#else /* IRIS or not USG */
+static struct exec hdr, ohdr;
#define NEWMAGIC ZMAGIC
-#endif /* IRIS or IBMAIX not USG */
+#endif /* IRIS or not USG */
#endif /* not HPUX */
static int unexec_text_start;
#endif
f_hdr.f_flags |= (F_RELFLG | F_EXEC);
-#ifdef TPIX
- f_hdr.f_nscns = 3;
-#endif
-#ifdef EXEC_MAGIC
- f_ohdr.magic = EXEC_MAGIC;
-#endif
#ifndef NO_REMAP
f_ohdr.text_start = (long) start_of_text ();
f_ohdr.tsize = data_start - f_ohdr.text_start;
#endif /* NO_REMAP */
f_ohdr.dsize = bss_start - f_ohdr.data_start;
f_ohdr.bsize = bss_end - bss_start;
-#ifndef KEEP_OLD_TEXT_SCNPTR
/* On some machines, the old values are right.
??? Maybe on all machines with NO_REMAP. */
f_thdr.s_size = f_ohdr.tsize;
f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr);
f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr));
-#endif /* KEEP_OLD_TEXT_SCNPTR */
#ifdef ADJUST_TEXT_SCNHDR_SIZE
/* On some machines, `text size' includes all headers. */
f_thdr.s_size -= f_thdr.s_scnptr;
f_thdr.s_scnptr
= (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT;
#endif /* SECTION_ALIGNMENT */
-#ifdef TPIX
- f_thdr.s_scnptr = 0xd0;
-#endif
text_scnptr = f_thdr.s_scnptr;
-#ifdef ADJUST_TEXTBASE
- text_scnptr = sizeof (f_hdr) + sizeof (f_ohdr) + (f_hdr.f_nscns) * (sizeof (f_thdr));
-#endif
-#ifndef KEEP_OLD_PADDR
f_dhdr.s_paddr = f_ohdr.data_start;
-#endif /* KEEP_OLD_PADDR */
f_dhdr.s_vaddr = f_ohdr.data_start;
f_dhdr.s_size = f_ohdr.dsize;
f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size;
= (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT;
#endif /* DATA_SECTION_ALIGNMENT */
data_scnptr = f_dhdr.s_scnptr;
-#ifndef KEEP_OLD_PADDR
f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize;
-#endif /* KEEP_OLD_PADDR */
f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize;
f_bhdr.s_size = f_ohdr.bsize;
f_bhdr.s_scnptr = 0L;
lseek (new, (long) text_scnptr, 0);
ptr = (char *) f_ohdr.text_start;
-#ifdef HEADER_INCL_IN_TEXT
- /* For Gould UTX/32, text starts after headers */
- ptr = (char *) (ptr + text_scnptr);
-#endif /* HEADER_INCL_IN_TEXT */
end = ptr + f_ohdr.tsize;
write_segment (new, ptr, end);
the bitmaps. */
w32_init_fringe (terminal->rif);
-#ifndef F_SETOWN_BUG
#ifdef F_SETOWN
-#ifdef F_SETOWN_SOCK_NEG
- /* stdin is a socket here */
- fcntl (connection, F_SETOWN, -getpid ());
-#else /* ! defined (F_SETOWN_SOCK_NEG) */
fcntl (connection, F_SETOWN, getpid ());
-#endif /* ! defined (F_SETOWN_SOCK_NEG) */
#endif /* ! defined (F_SETOWN) */
-#endif /* F_SETOWN_BUG */
#ifdef SIGIO
if (interrupt_input)
}
ice_fd = IceConnectionNumber (iceConn);
-#ifndef F_SETOWN_BUG
#ifdef F_SETOWN
-#ifdef F_SETOWN_SOCK_NEG
- /* stdin is a socket here */
- fcntl (ice_fd, F_SETOWN, -getpid ());
-#else /* ! defined (F_SETOWN_SOCK_NEG) */
fcntl (ice_fd, F_SETOWN, getpid ());
-#endif /* ! defined (F_SETOWN_SOCK_NEG) */
#endif /* ! defined (F_SETOWN) */
-#endif /* F_SETOWN_BUG */
#ifdef SIGIO
if (interrupt_input)
add_keyboard_wait_descriptor (connection);
#endif
-#ifndef F_SETOWN_BUG
#ifdef F_SETOWN
-#ifdef F_SETOWN_SOCK_NEG
- /* stdin is a socket here */
- fcntl (connection, F_SETOWN, -getpid ());
-#else /* ! defined (F_SETOWN_SOCK_NEG) */
fcntl (connection, F_SETOWN, getpid ());
-#endif /* ! defined (F_SETOWN_SOCK_NEG) */
#endif /* ! defined (F_SETOWN) */
-#endif /* F_SETOWN_BUG */
#ifdef SIGIO
if (interrupt_input)