summaryrefslogtreecommitdiff
path: root/mac/inc
diff options
context:
space:
mode:
authorAndrew Choi <akochoi@shaw.ca>2000-10-22 16:50:16 +0000
committerAndrew Choi <akochoi@shaw.ca>2000-10-22 16:50:16 +0000
commit1a578e9be2034298bb8ac29b7b84086a4ab290f4 (patch)
tree52e921cd58e9ac6688757ff1b1d0531c9820475f /mac/inc
parentd371949a0f0d152bcc9013b7bbd15418465a1792 (diff)
downloademacs-1a578e9be2034298bb8ac29b7b84086a4ab290f4.tar.gz
Initial check-in: changes for building Emacs under Mac OS.
2000-10-23 Andrew Choi <akochoi@i-cable.com> * dispextern.h [macintosh]: Include macgui.h instead of macterm.h. * dispnew.c [macintosh]: Include macterm.h. (init_display) [macintosh]: initialization for window system. * emacs.c (main) [macintosh]: Call syms_of_textprop, syms_of_macfns, syms_of_ccl, syms_of_fontset, syms_of_xterm, syms_of_search, x_term_init, and init_keyboard before calling init_window_once. Also, call syms_of_xmenu. * fontset.c (syms_of_fontset) [macintosh]: Set ASCII font of default fontset to Monaco. * frame.c [macintosh]: Include macterm.h. Remove declarations of NewMacWindow and DisposeMacWindow. (make_terminal_frame) [macintosh]: Call make_mac_terminal_frame instead of calling NewMacWindow and setting fields of f->output_data.mac directly. Call init_frame_faces. (Fdelete_frame) [macintosh]: Remove unused code. (Fmodify_frame_parameters) [macintosh]: Call x_set_frame_parameters instead of mac_set_frame_parameters. * frame.h [macintosh]: Define menu_bar_lines field in struct frame. Define FRAME_EXTERNAL_MENU_BAR macro. * keyboard.c [macintosh]: Include macterm.h. (kbd_buffer_get_event) [macintosh]: Generate delete_window_event and menu_bar_activate_event type events as for X and NT. (make_lispy_event) [macintosh]: Construct lisp events of type MENU_BAR_EVENT as for X and NT. * sysdep.c [macintosh]: Remove declaration for sys_signal. Include stdlib.h. Remove definition of Vx_bitmap_file_path. (sys_subshell) [macintosh]: Remove definition entirely. (init_sys_modes) [macintosh]: Do not initialize Vwindow_system and Vwindow_system_version here. Remove initialization of Vx_bitmap_file_path. (read_input_waiting): Correct the number of parameters passed to read_socket_hook. Move all Macintosh functions to mac/mac.c. * term.c [macintosh]: Include macterm.h. * window.c [macintosh]: Include macterm.h. * xdisp.c [macintosh]: Include macterm.h. Declare set_frame_menubar and pending_menu_activation. (echo_area_display) [macintosh]: Do not return if terminal frame is the selected frame. (update_menu_bar) [macintosh]: Check FRAME_EXTERNAL_MENU_BAR (f). Allow only the selected frame to set menu bar. (redisplay_window) [macintosh]: Obtain menu bar to redisplay by calling FRAME_EXTERNAL_MENU_BAR (f). (display_menu_bar) [macintosh]: Check FRAME_MAC_P (f). * xfaces.c [macintosh]: Include macterm.h. Define x_display_info and check_x. Declare XCreateGC. Define x_create_gc and x_free_gc. Initialize font_sort_order. (x_face_list_fonts) [macintosh]: Use the same code as WINDOWSNT, but call x_list_fonts instead of w32_list_fonts. (Finternal_face_x_get_resource) [macintosh]: Do not call display_x_get_resource. (prepare_face_for_display) [macintosh]: Set xgcv.font. (realize_x_face) [macintosh]: Load the font if it is specified in ATTRS. (syms_of_xfaces) [macintosh]: Initialize Vscalable_fonts_allowed to Qt. * cus-edit.el (custom-button-face): Use 3D look for mac. (custom-button-pressed-face): Likewise. * faces.el (set-face-attributes-from-resources): Handle mac frames in the same way as x and w32 frames. (face-valid-attribute-values): Likewise. (read-face-attribute): Likewise. (defined-colors): Likewise. (color-defined-p): Likewise. (color-values): Likewise. (display-grayscale-p): Likewise. (face-set-after-frame-default): Likewise. (mode-line): Same default face as for x and w32. (tool-bar): Likewise. * frame.el: Remove call to frame-notice-user-settings at end of the file. * info.el (Info-fontify-node): make underlines invisible for mac as for x, pc, and w32 frame types. * term/mac-win.el: New file.
Diffstat (limited to 'mac/inc')
-rw-r--r--mac/inc/alloca.h8
-rw-r--r--mac/inc/cmdline-defs-cw5.h2
-rw-r--r--mac/inc/cmdline-defs-cw6.h4
-rw-r--r--mac/inc/config.h570
-rw-r--r--mac/inc/dirent.h48
-rw-r--r--mac/inc/epaths.h61
-rw-r--r--mac/inc/m-mac.h140
-rw-r--r--mac/inc/macgui.h155
-rw-r--r--mac/inc/macterm.h665
-rw-r--r--mac/inc/pwd.h37
-rw-r--r--mac/inc/s-mac.h320
-rw-r--r--mac/inc/sys/file.h59
-rw-r--r--mac/inc/sys/ioctl.h31
-rw-r--r--mac/inc/sys/param.h28
-rw-r--r--mac/inc/sys/stat.h86
-rw-r--r--mac/inc/sys/time.h31
-rw-r--r--mac/inc/sys/types.h40
-rw-r--r--mac/inc/termio.h68
-rw-r--r--mac/inc/utime.h37
-rw-r--r--mac/inc/utsname.h32
20 files changed, 2422 insertions, 0 deletions
diff --git a/mac/inc/alloca.h b/mac/inc/alloca.h
new file mode 100644
index 00000000000..a84eee04c6e
--- /dev/null
+++ b/mac/inc/alloca.h
@@ -0,0 +1,8 @@
+#ifndef _ALLOCA_H_
+#define _ALLOCA_H_
+
+#if __MRC__
+void *__alloca(size_t size);
+#endif
+
+#endif \ No newline at end of file
diff --git a/mac/inc/cmdline-defs-cw5.h b/mac/inc/cmdline-defs-cw5.h
new file mode 100644
index 00000000000..78577837761
--- /dev/null
+++ b/mac/inc/cmdline-defs-cw5.h
@@ -0,0 +1,2 @@
+#define emacs 1
+#define HAVE_CONFIG_H \ No newline at end of file
diff --git a/mac/inc/cmdline-defs-cw6.h b/mac/inc/cmdline-defs-cw6.h
new file mode 100644
index 00000000000..c24befb02f7
--- /dev/null
+++ b/mac/inc/cmdline-defs-cw6.h
@@ -0,0 +1,4 @@
+#define emacs 1
+#define HAVE_CONFIG_H
+
+#define CODEWARRIOR_VERSION_6
diff --git a/mac/inc/config.h b/mac/inc/config.h
new file mode 100644
index 00000000000..aeb4a8aaad7
--- /dev/null
+++ b/mac/inc/config.h
@@ -0,0 +1,570 @@
+/* Handcrafted Emacs site configuration file for Mac OS. -*- C -*- */
+
+/* GNU Emacs site configuration template file. -*- C -*-
+ Copyright (C) 1988, 1993, 1994, 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+/* No code in Emacs #includes config.h twice, but some of the code
+ intended to work with other packages as well (like gmalloc.c)
+ think they can include it as many times as they like. */
+#ifndef EMACS_CONFIG_H
+#define EMACS_CONFIG_H
+
+/* These are all defined in the top-level Makefile by configure.
+ They're here only for reference. */
+
+/* Define GNU_MALLOC if you want to use the GNU memory allocator. */
+/* #undef GNU_MALLOC */
+
+/* Define if you are using the GNU C Library. */
+/* #undef DOUG_LEA_MALLOC */
+
+/* Define REL_ALLOC if you want to use the relocating allocator for
+ buffer space. */
+/* #undef REL_ALLOC */
+
+/* Define HAVE_X_WINDOWS if you want to use the X window system. */
+/* #undef HAVE_X_WINDOWS */
+
+/* Define HAVE_X11 if you want to use version 11 of X windows.
+ Otherwise, Emacs expects to use version 10. */
+/* #undef HAVE_X11 */
+
+/* Define if using an X toolkit. */
+/* #undef USE_X_TOOLKIT */
+
+/* Define this if you're using XFree386. */
+/* #undef HAVE_XFREE386 */
+
+/* Define this if you have Motif 2.1 or newer. */
+/* #undef HAVE_MOTIF_2_1 */
+
+/* Define HAVE_MENUS if you have mouse menus.
+ (This is automatic if you use X, but the option to specify it remains.)
+ It is also defined with other window systems that support xmenu.c. */
+#define HAVE_MENUS 1
+
+/* Define if we have the X11R6 or newer version of Xt. */
+/* #undef HAVE_X11XTR6 */
+
+/* Define if we have the X11R6 or newer version of Xlib. */
+/* #undef HAVE_X11R6 */
+
+/* Define if we have the X11R5 or newer version of Xlib. */
+/* #undef HAVE_X11R5 */
+
+/* Define if we have the XPM libary. */
+/* #undef HAVE_XPM */
+
+/* Define if we have the PNG library. */
+/* #undef HAVE_PNG */
+
+/* Define if we have the JPEG library. */
+/* #undef HAVE_JPEG */
+
+/* Define if we have the TIFF library. */
+/* #undef HAVE_TIFF */
+
+/* Define if we have the GIF library. */
+/* #undef HAVE_GIF */
+
+/* Define if libXaw3d is available. */
+/* #undef HAVE_XAW3D */
+
+/* Define if we should use toolkit scroll bars. */
+/* #undef USE_TOOLKIT_SCROLL_BARS */
+
+/* Define if we should use XIM, if it is available. */
+/* #undef USE_XIM */
+
+/* Define if netdb.h declares h_errno. */
+/* #undef HAVE_H_ERRNO */
+
+/* If we're using any sort of window system, define some consequences. */
+#ifdef HAVE_X_WINDOWS
+#define HAVE_WINDOW_SYSTEM
+#define MULTI_KBOARD
+#define HAVE_MOUSE
+#endif
+
+/* Define for MacOS */
+#define HAVE_WINDOW_SYSTEM 1
+#define HAVE_MOUSE 1
+
+/* Define USER_FULL_NAME to return a string
+ that is the user's full name.
+ It can assume that the variable `pw'
+ points to the password file entry for this user.
+
+ At some sites, the pw_gecos field contains
+ the user's full name. If neither this nor any other
+ field contains the right thing, use pw_name,
+ giving the user's login name, since that is better than nothing. */
+#define USER_FULL_NAME pw->pw_name
+
+/* Define AMPERSAND_FULL_NAME if you use the convention
+ that & in the full name stands for the login id. */
+/* Turned on June 1996 supposing nobody will mind it. */
+/* #undef AMPERSAND_FULL_NAME */
+
+/* Things set by --with options in the configure script. */
+
+/* Define to support POP mail retrieval. */
+/* #undef MAIL_USE_POP 1 */
+
+/* Define to support Kerberos-authenticated POP mail retrieval. */
+/* #undef KERBEROS */
+/* Define to use Kerberos 5 instead of Kerberos 4 */
+/* #undef KERBEROS5 */
+/* Define to support GSS-API in addition to (or instead of) Kerberos */
+/* #undef GSSAPI */
+
+/* Define to support using a Hesiod database to find the POP server. */
+/* #undef HESIOD */
+
+/* Header for Voxware or PCM sound card driver. */
+/* #undef HAVE_MACHINE_SOUNDCARD_H */
+/* #undef HAVE_SYS_SOUNDCARD_H */
+/* #undef HAVE_SOUNDCARD_H */
+
+/* Define HAVE_SOUND if we have sound support. We know it works
+ and compiles only on the specified platforms. For others,
+ it probably doesn't make sense to try. */
+
+#if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__
+#ifdef HAVE_MACHINE_SOUNDCARD_H
+#define HAVE_SOUND 1
+#endif
+#ifdef HAVE_SYS_SOUNDCARD_H
+#define HAVE_SOUND 1
+#endif
+#ifdef HAVE_SOUNDCARD_H
+#define HAVE_SOUND 1
+#endif
+#endif /* __FreeBSD__ || __NetBSD__ || __linux__ */
+
+/* Some things figured out by the configure script, grouped as they are in
+ configure.in. */
+#ifndef _ALL_SOURCE /* suppress warning if this is pre-defined */
+/* #undef _ALL_SOURCE */
+#endif
+
+/* #undef HAVE_SYS_SELECT_H */
+/* #undef HAVE_SYS_TIMEB_H */
+#define HAVE_SYS_TIME_H 1
+
+#ifdef __MRC__
+#undef HAVE_UNISTD_H
+#else /* CodeWarrior */
+#define HAVE_UNISTD_H 1
+#endif
+
+#define HAVE_UTIME_H 1
+/* #undef HAVE_LINUX_VERSION_H */
+/* #undef HAVE_SYS_SYSTEMINFO_H */
+/* #undef HAVE_TERMIOS_H */
+#define HAVE_LIMITS_H 1
+#define HAVE_STRING_H 1
+/* #undef HAVE_STDLIB_H */
+/* #undef HAVE_TERMCAP_H */
+/* #undef HAVE_TERM_H */
+/* #undef HAVE_STDIO_EXT_H */
+/* #undef STDC_HEADERS */
+/* #undef TIME_WITH_SYS_TIME */
+/* #undef HAVE_VFORK_H */
+#define HAVE_FCNTL_H 1
+/* #undef HAVE_SETITIMER */
+/* #undef HAVE_UALARM */
+/* #undef HAVE_SYS_WAIT_H */
+
+/* #undef HAVE_LIBDNET */
+/* #undef HAVE_LIBPTHREADS */
+/* #undef HAVE_LIBRESOLV */
+/* #undef HAVE_LIBXMU */
+/* #undef HAVE_LIBNCURSES */
+/* #undef HAVE_LIBINTL */
+/* #undef HAVE_LIBXP */
+
+/* movemail Kerberos support */
+/* libraries */
+/* #undef HAVE_LIBKRB */
+/* #undef HAVE_LIBKRB4 */
+/* #undef HAVE_LIBDES */
+/* #undef HAVE_LIBDES425 */
+/* #undef HAVE_LIBKRB5 */
+/* #undef HAVE_LIBCRYPTO */
+/* #undef HAVE_LIBCOM_ERR */
+/* header files */
+/* #undef HAVE_KRB5_H */
+/* #undef HAVE_DES_H */
+/* #undef HAVE_KRB_H */
+/* #undef HAVE_KERBEROSIV_DES_H */
+/* #undef HAVE_KERBEROSIV_KRB_H */
+/* #undef HAVE_KERBEROS_DES_H */
+/* #undef HAVE_KERBEROS_KRB_H */
+/* #undef HAVE_COM_ERR_H */
+
+/* GSS-API libraries and headers */
+/* #undef HAVE_LIBGSSAPI_KRB5 */
+/* #undef HAVE_LIBGSSAPI */
+/* #undef HAVE_GSSAPI_H */
+
+/* Mail-file locking */
+/* #undef HAVE_LIBMAIL */
+/* #undef HAVE_MAILLOCK_H */
+/* #undef HAVE_TOUCHLOCK */
+
+/* #undef HAVE_ALLOCA_H */
+
+/* #undef HAVE_DEV_PTMX */
+
+#define HAVE_GETTIMEOFDAY 1
+/* If we don't have gettimeofday,
+ the test for GETTIMEOFDAY_ONE_ARGUMENT may succeed,
+ but we should ignore it. */
+#ifdef HAVE_GETTIMEOFDAY
+#define GETTIMEOFDAY_ONE_ARGUMENT 1
+#endif
+/* #undef HAVE_GETHOSTNAME */
+/* #undef HAVE_GETDOMAINNAME */
+/* #undef HAVE_DUP2 */
+#define HAVE_RENAME 1
+#define HAVE_CLOSEDIR 1
+
+/* #undef TM_IN_SYS_TIME */
+/* #undef HAVE_TM_ZONE */
+/* #undef HAVE_TZNAME */
+/* #undef HAVE_TM_GMTOFF */
+
+/* #undef const */
+
+/* #undef HAVE_LONG_FILE_NAMES */
+
+/* #undef CRAY_STACKSEG_END */
+
+/* #undef UNEXEC_SRC unexelf.c
+
+/* #undef HAVE_LIBXBSD */
+/* #undef HAVE_XRMSETDATABASE */
+/* #undef HAVE_XSCREENRESOURCESTRING */
+/* #undef HAVE_XSCREENNUMBEROFSCREEN */
+/* #undef HAVE_XSETWMPROTOCOLS */
+
+#define HAVE_MKDIR 1
+#define HAVE_RMDIR 1
+/* #undef HAVE_SYSINFO */
+/* #undef HAVE_RANDOM */
+/* #undef HAVE_LRAND48 */
+/* #undef HAVE_BCOPY */
+/* #undef HAVE_BCMP */
+#define HAVE_LOGB 1
+#define HAVE_FREXP 1
+#define HAVE_FMOD 1
+
+#ifdef __MRC__
+#undef HAVE_RINT
+#else /* CodeWarrior */
+#define HAVE_RINT
+#endif
+
+/* #undef HAVE_CBRT */
+/* #undef HAVE_FTIME */
+/* #undef HAVE_RES_INIT */ /* For -lresolv on Suns. */
+/* #undef HAVE_SETSID */
+/* #undef HAVE_FPATHCONF */
+#define HAVE_SELECT 1
+/* #undef HAVE_MKTIME */
+/* #undef BROKEN_MKTIME */ /* have mktime but it's broken */
+/* #undef HAVE_EUIDACCESS */
+/* #undef HAVE_GETPAGESIZE */
+/* #undef HAVE_TZSET */
+#define HAVE_SETLOCALE 1
+/* #undef HAVE_UTIMES */
+/* #undef HAVE_SETRLIMIT */
+/* #undef HAVE_SETPGID */
+/* #undef HAVE_GETCWD */
+#define HAVE_GETWD 1
+/* #undef HAVE_SHUTDOWN */
+#define HAVE_STRFTIME 1
+/* #undef HAVE_GETADDRINFO */
+/* #undef HAVE___FPENDING */
+/* #undef HAVE_FTELLO */
+/* #undef HAVE_GETLOADAVG */
+/* #undef NLIST_STRUCT */
+/* #undef NLIST_NAME_UNION */
+/* #undef HAVE_MBLEN */
+/* #undef HAVE_MBRLEN */
+/* #undef HAVE_STRSIGNAL */
+/* #undef HAVE_GRANTPT */
+/* #undef HAVE_GETPT */
+/* #undef HAVE_SPEED_T */ /* speed_t typedef in termios.h */
+/* #undef HAVE_STRUCT_TIMEZONE */
+
+/* #undef LOCALTIME_CACHE */
+/* #undef HAVE_INET_SOCKETS */
+
+/* #undef HAVE_AIX_SMT_EXP */
+
+/* #undef vfork */
+
+/* Define if you have the ANSI `strerror' function.
+ Otherwise you must have the variable `char *sys_errlist[]'. */
+#define HAVE_STRERROR 1
+
+/* Define if `sys_siglist' is declared by <signal.h>. */
+/* #undef SYS_SIGLIST_DECLARED */
+
+/* Define if `struct utimbuf' is declared by <utime.h>. */
+#define HAVE_STRUCT_UTIMBUF 1
+
+/* Define if `struct timeval' is declared by <sys/time.h>. */
+#define HAVE_TIMEVAL 1
+
+/* If using GNU, then support inline function declarations. */
+/* Don't try to switch on inline handling as detected by AC_C_INLINE
+ generally, because even if non-gcc compilers accept `inline', they
+ may reject `extern inline'. */
+#ifdef __GNUC__
+#define INLINE __inline__
+#else
+#define INLINE
+#endif
+
+/* Define this if you don't have struct exception in math.h. */
+/* #undef NO_MATHERR */
+
+/* Define as `void' if your compiler accepts `void *'; otherwise
+ define as `char'. */
+#define POINTER_TYPE void
+#define PTR POINTER_TYPE * /* For strftime.c. */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+/* Define to make ftello visible on some hosts (e.g. HP-UX 10.20). */
+/* #undef _LARGEFILE_SOURCE */
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+/* Define to make ftello visible on some hosts (e.g. glibc 2.1.3). */
+/* #undef _XOPEN_SOURCE */
+
+#ifdef __MRC__
+#define EMACS_CONFIGURATION "macos-mpw"
+#else /* Assume CodeWarrior */
+#define EMACS_CONFIGURATION "macos-cw"
+#endif
+
+#define EMACS_CONFIG_OPTIONS ""
+
+/* The configuration script defines opsysfile to be the name of the
+ s/SYSTEM.h file that describes the system type you are using. The file
+ is chosen based on the configuration name you give.
+
+ See the file ../etc/MACHINES for a list of systems and the
+ configuration names to use for them.
+
+ See s/template.h for documentation on writing s/SYSTEM.h files. */
+#undef config_opsysfile
+#include "s-mac.h"
+
+/* The configuration script defines machfile to be the name of the
+ m/MACHINE.h file that describes the machine you are using. The file is
+ chosen based on the configuration name you give.
+
+ See the file ../etc/MACHINES for a list of machines and the
+ configuration names to use for them.
+
+ See m/template.h for documentation on writing m/MACHINE.h files. */
+#undef config_machfile
+#include "m-mac.h"
+
+/* Load in the conversion definitions if this system
+ needs them and the source file being compiled has not
+ said to inhibit this. There should be no need for you
+ to alter these lines. */
+
+#ifdef SHORTNAMES
+#ifndef NO_SHORTNAMES
+#include "../shortnames/remap.h"
+#endif /* not NO_SHORTNAMES */
+#endif /* SHORTNAMES */
+
+/* If no remapping takes place, static variables cannot be dumped as
+ pure, so don't worry about the `static' keyword. */
+#ifdef NO_REMAP
+/* #undef static */
+#endif
+
+/* Define `subprocesses' should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ These do not work for some USG systems yet;
+ for the ones where they work, the s/SYSTEM.h file defines this flag. */
+
+#ifndef VMS
+#ifndef USG
+/* #define subprocesses */
+#endif
+#endif
+
+/* Define LD_SWITCH_SITE to contain any special flags your loader may need. */
+/* #undef LD_SWITCH_SITE */
+
+/* Define C_SWITCH_SITE to contain any special flags your compiler needs. */
+/* #undef C_SWITCH_SITE */
+
+/* Define LD_SWITCH_X_SITE to contain any special flags your loader
+ may need to deal with X Windows. For instance, if you've defined
+ HAVE_X_WINDOWS above and your X libraries aren't in a place that
+ your loader can find on its own, you might want to add "-L/..." or
+ something similar. */
+/* #undef LD_SWITCH_X_SITE */
+
+/* Define LD_SWITCH_X_SITE_AUX with an -R option
+ in case it's needed (for Solaris, for example). */
+/* #undef LD_SWITCH_X_SITE_AUX */
+
+/* Define C_SWITCH_X_SITE to contain any special flags your compiler
+ may need to deal with X Windows. For instance, if you've defined
+ HAVE_X_WINDOWS above and your X include files aren't in a place
+ that your compiler can find on its own, you might want to add
+ "-I/..." or something similar. */
+/* #undef C_SWITCH_X_SITE */
+
+/* Define STACK_DIRECTION here, but not if m/foo.h did. */
+#ifndef STACK_DIRECTION
+/* #undef STACK_DIRECTION */
+#endif
+
+/* Define the return type of signal handlers if the s-xxx file
+ did not already do so. */
+#define RETSIGTYPE void
+
+/* SIGTYPE is the macro we actually use. */
+#ifndef SIGTYPE
+#define SIGTYPE RETSIGTYPE
+#endif
+
+#ifdef emacs /* Don't do this for lib-src. */
+/* Tell regex.c to use a type compatible with Emacs. */
+#define RE_TRANSLATE_TYPE Lisp_Object
+#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
+#define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0)
+#endif
+
+/* Avoid link-time collision with system mktime if we will use our own. */
+#if ! HAVE_MKTIME || BROKEN_MKTIME
+#define mktime emacs_mktime
+#endif
+
+/* The rest of the code currently tests the CPP symbol BSTRING.
+ Override any claims made by the system-description files.
+ Note that on some SCO version it is possible to have bcopy and not bcmp. */
+/* #undef BSTRING */
+#if defined (HAVE_BCOPY) && defined (HAVE_BCMP)
+#define BSTRING
+#endif
+
+/* Define to empty if the keyword `volatile' does not work. Warning:
+ valid code using `volatile' can become incorrect without. Disable
+ with care. */
+/* #undef volatile */
+
+/* Some of the files of Emacs which are intended for use with other
+ programs assume that if you have a config.h file, you must declare
+ the type of getenv.
+
+ This declaration shouldn't appear when alloca.s or Makefile.in
+ includes config.h. */
+#ifndef NOT_C_CODE
+extern char *getenv ();
+#endif
+
+#endif /* EMACS_CONFIG_H */
+
+/* These default definitions are good for almost all machines.
+ The exceptions override them in m/MACHINE.h. */
+
+#ifndef BITS_PER_CHAR
+#define BITS_PER_CHAR 8
+#endif
+
+#ifndef BITS_PER_SHORT
+#define BITS_PER_SHORT 16
+#endif
+
+/* Note that lisp.h uses this in a preprocessor conditional, so it
+ would not work to use sizeof. That being so, we do all of them
+ without sizeof, for uniformity's sake. */
+#ifndef BITS_PER_INT
+#define BITS_PER_INT 32
+#endif
+
+#ifndef BITS_PER_LONG
+#ifdef _LP64
+#define BITS_PER_LONG 64
+#else
+#define BITS_PER_LONG 32
+#endif
+#endif
+
+/* Define if the compiler supports function prototypes. It may do so
+ but not define __STDC__ (e.g. DEC C by default) or may define it as
+ zero. */
+/* #undef PROTOTYPES */
+/* For mktime.c: */
+#ifndef __P
+# if defined PROTOTYPES
+# define __P(args) args
+# else
+# define __P(args) ()
+# endif /* GCC. */
+#endif /* __P */
+
+
+/* Don't include "string.h" or <stdlib.h> in non-C code. */
+#ifndef NOT_C_CODE
+#ifdef HAVE_STRING_H
+#include "string.h"
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#endif
+
+/* Define HAVE_X_I18N if we have usable i18n support. */
+
+#ifdef HAVE_X11R6
+#define HAVE_X_I18N
+#elif defined HAVE_X11R5 && !defined X11R5_INHIBIT_I18N
+#define HAVE_X_I18N
+#endif
+
+/* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */
+
+#if defined HAVE_X11R6 && !defined INHIBIT_X11R6_XIM
+#define HAVE_X11R6_XIM
+#endif
+
+/* Should we enable expensive run-time checking of data types? */
+/* #undef ENABLE_CHECKING */
+
+/* #define GLYPH_DEBUG 1 */
+
+#define NO_RETURN /* nothing */ \ No newline at end of file
diff --git a/mac/inc/dirent.h b/mac/inc/dirent.h
new file mode 100644
index 00000000000..8513acb2bee
--- /dev/null
+++ b/mac/inc/dirent.h
@@ -0,0 +1,48 @@
+/* Replacement dirent.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _DIRENT_H
+#define _DIRENT_H
+
+/* for definition of FSSpec */
+#include <Files.h>
+
+/* for definition of ino_t */
+#include <sys/types.h>
+
+struct dirent {
+ ino_t d_ino;
+ char *d_name;
+};
+
+typedef struct DIR {
+ long dir_id;
+ short vol_ref_num;
+ long current_index;
+ int getting_volumes; /* true if this DIR struct refers to the root directory */
+} DIR;
+
+extern DIR *opendir(const char *);
+extern int closedir(DIR *);
+extern struct dirent *readdir(DIR *);
+
+#endif /* _DIRENT_H */
diff --git a/mac/inc/epaths.h b/mac/inc/epaths.h
new file mode 100644
index 00000000000..706a8aa42d9
--- /dev/null
+++ b/mac/inc/epaths.h
@@ -0,0 +1,61 @@
+/* Hey Emacs, this is -*- C -*- code! */
+
+/* Handcrafted epaths.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+/* The default search path for Lisp function "load".
+ This sets load-path. */
+#define PATH_LOADSEARCH "~emacs/lisp:~emacs/leim:~emacs/lisp/calendar:~emacs/lisp/emacs-lisp:~emacs/lisp/emulation:~emacs/lisp/progmodes:~emacs/lisp/textmodes:~emacs/lisp/international:~emacs/lisp/language:~emacs/lisp/play"
+
+/* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This
+ path is usually identical to PATH_LOADSEARCH except that the entry
+ for the directory containing the installed lisp files has been
+ replaced with ../lisp. */
+#define PATH_DUMPLOADSEARCH "~emacs/lisp"
+
+/* The extra search path for programs to invoke. This is appended to
+ whatever the PATH environment variable says to set the Lisp
+ variable exec-path and the first file name in it sets the Lisp
+ variable exec-directory. exec-directory is used for finding
+ executables and other architecture-dependent files. */
+#define PATH_EXEC "~emacs/mac/bin"
+
+/* Where Emacs should look for its architecture-independent data
+ files, like the NEWS file. The lisp variable data-directory
+ is set to this value. */
+#define PATH_DATA "~emacs/data"
+
+/* Where Emacs should look for X bitmap files.
+ The lisp variable x-bitmap-file-path is set based on this value. */
+/* #define PATH_BITMAPS "/usr/include/X11/bitmaps" */
+
+/* Where Emacs should look for its docstring file. The lisp variable
+ doc-directory is set to this value. */
+#define PATH_DOC "../etc"
+
+/* Where the configuration process believes the info tree lives. The
+ lisp variable configure-info-directory gets its value from this
+ macro, and is then used to set the Info-default-directory-list. */
+#define PATH_INFO "~emacs/info"
+
+/* Where Emacs should look for the application default file. */
+/* #define PATH_X_DEFAULTS "/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" */
diff --git a/mac/inc/m-mac.h b/mac/inc/m-mac.h
new file mode 100644
index 00000000000..6378c614e93
--- /dev/null
+++ b/mac/inc/m-mac.h
@@ -0,0 +1,140 @@
+/* Handcrafted m-mac.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+/* The following line tells the configuration script what sort of
+ operating system this machine is likely to run.
+ USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */
+
+/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
+ is the most significant byte. */
+
+#define WORDS_BIG_ENDIAN
+
+/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
+ * group of arguments and treat it as an array of the arguments. */
+
+#define NO_ARG_ARRAY
+
+/* Define WORD_MACHINE if addresses and such have
+ * to be corrected before they can be used as byte counts. */
+
+/* #define WORD_MACHINE */
+
+/* Now define a symbol for the cpu type, if your compiler
+ does not define it automatically:
+ Ones defined so far include vax, m68000, ns16000, pyramid,
+ orion, tahoe, APOLLO and many others */
+
+/* Use type int rather than a union, to represent Lisp_Object */
+/* This is desirable for most machines. */
+
+#define NO_UNION_TYPE
+
+/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
+ the 24-bit bit field into an int. In other words, if bit fields
+ are always unsigned.
+
+ If you use NO_UNION_TYPE, this flag does not matter. */
+
+#define EXPLICIT_SIGN_EXTEND
+
+/* Data type of load average, as read out of kmem. */
+
+/* #define LOAD_AVE_TYPE long */
+
+/* Convert that into an integer that is 100 for a load average of 1.0 */
+
+/* #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) */
+
+/* Define CANNOT_DUMP on machines where unexec does not work.
+ Then the function dump-emacs will not be defined
+ and temacs will do (load "loadup") automatically unless told otherwise. */
+
+#define CANNOT_DUMP
+
+/* Define VIRT_ADDR_VARIES if the virtual addresses of
+ pure and impure space as loaded can vary, and even their
+ relative order cannot be relied on.
+
+ Otherwise Emacs assumes that text space precedes data space,
+ numerically. */
+
+#define VIRT_ADDR_VARIES
+
+/* Define C_ALLOCA if this machine does not support a true alloca
+ and the one written in C should be used instead.
+ Define HAVE_ALLOCA to say that the system provides a properly
+ working alloca function and it should be used.
+ Define neither one if an assembler-language alloca
+ in the file alloca.s should be used. */
+
+#define C_ALLOCA
+/* #define HAVE_ALLOCA */
+
+/* Define NO_REMAP if memory segmentation makes it not work well
+ to change the boundary between the text section and data section
+ when Emacs is dumped. If you define this, the preloaded Lisp
+ code will not be sharable; but that's better than failing completely. */
+
+/* #define NO_REMAP */
+
+/* Some really obscure 4.2-based systems (like Sequent DYNIX)
+ * do not support asynchronous I/O (using SIGIO) on sockets,
+ * even though it works fine on tty's. If you have one of
+ * these systems, define the following, and then use it in
+ * config.h (or elsewhere) to decide when (not) to use SIGIO.
+ *
+ * You'd think this would go in an operating-system description file,
+ * but since it only occurs on some, but not all, BSD systems, the
+ * reasonable place to select for it is in the machine description
+ * file.
+ */
+
+#define NO_SOCK_SIGIO
+
+
+/* After adding support for a new system, modify the large case
+ statement in the `configure' script to recognize reasonable
+ configuration names, and add a description of the system to
+ `etc/MACHINES'.
+
+ If you've just fixed a problem in an existing configuration file,
+ you should also check `etc/MACHINES' to make sure its descriptions
+ of known problems in that configuration should be updated. */
+
+/* MPW build crashes if this is not defined. */
+#ifdef __MRC__
+#define IEEE_FLOATING_POINT 1
+#endif
+
+#if 0
+/* The usual definition of XINT, which involves shifting, does not
+ sign-extend properly on this machine. */
+
+#define XINT(i) (((sign_extend_temp=(i)) & 0x00800000) \
+ ? (sign_extend_temp | 0xFF000000) \
+ : (sign_extend_temp & 0x00FFFFFF))
+
+#ifdef emacs /* Don't do this when making xmakefile! */
+extern int sign_extend_temp;
+#endif
+#endif
diff --git a/mac/inc/macgui.h b/mac/inc/macgui.h
new file mode 100644
index 00000000000..1072bcec533
--- /dev/null
+++ b/mac/inc/macgui.h
@@ -0,0 +1,155 @@
+/* Definitions and headers for communication on the Mac OS.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef EMACS_MACGUI_H
+#define EMACS_MACGUI_H
+
+#include <MacTypes.h>
+#include <Quickdraw.h>
+
+typedef int Pixmap;
+typedef int Bitmap;
+
+typedef int Display; /* fix later */
+
+typedef unsigned long Time;
+typedef RGBColor Color;
+typedef WindowPtr Window;
+
+#define FACE_DEFAULT (~0)
+
+
+/* Emulate XCharStruct. */
+typedef struct _XCharStruct
+{
+ int rbearing;
+ int lbearing;
+ int width;
+ int ascent;
+ int descent;
+} XCharStruct;
+
+struct MacFontStruct {
+ char *fontname;
+
+ SInt16 mac_fontnum; /* font number of font used in this window */
+ int mac_fontsize; /* size of font */
+ Style mac_fontface; /* plain, bold, italics, etc. */
+ short mac_scriptcode; /* Mac OS script code for font used */
+
+#if 0
+ SInt16 mFontNum; /* font number of font used in this window */
+ short mScriptCode; /* Mac OS script code for font used */
+ int mFontSize; /* size of font */
+ Style mFontFace; /* plain, bold, italics, etc. */
+ int mHeight; /* height of one line of text in pixels */
+ int mWidth; /* width of one character in pixels */
+ int mAscent;
+ int mDescent;
+ int mLeading;
+ char mTwoByte; /* true for two-byte font */
+#endif
+
+/* from Xlib.h */
+#if 0
+ XExtData *ext_data; /* hook for extension to hang data */
+ Font fid; /* Font id for this font */
+ unsigned direction; /* hint about the direction font is painted */
+#endif
+ unsigned min_char_or_byte2;/* first character */
+ unsigned max_char_or_byte2;/* last character */
+ unsigned min_byte1; /* first row that exists */
+ unsigned max_byte1; /* last row that exists */
+#if 0
+ Bool all_chars_exist; /* flag if all characters have nonzero size */
+ unsigned default_char; /* char to print for undefined character */
+ int n_properties; /* how many properties there are */
+ XFontProp *properties; /* pointer to array of additional properties */
+#endif
+ XCharStruct min_bounds; /* minimum bounds over all existing char */
+ XCharStruct max_bounds; /* maximum bounds over all existing char */
+ XCharStruct *per_char; /* first_char to last_char information */
+ int ascent; /* logical extent above baseline for spacing */
+ int descent; /* logical decent below baseline for spacing */
+};
+
+typedef struct MacFontStruct MacFontStruct;
+typedef struct MacFontStruct XFontStruct;
+
+
+/* Emulate X GC's by keeping color and font info in a structure. */
+typedef struct _XGCValues
+{
+ unsigned long foreground;
+ unsigned long background;
+ XFontStruct *font;
+} XGCValues;
+
+typedef XGCValues *GC;
+
+extern XGCValues *
+XCreateGC (void *, Window, unsigned long, XGCValues *);
+
+#define GCForeground 0x01
+#define GCBackground 0x02
+#define GCFont 0x03
+#define GCGraphicsExposures 0
+
+/* Bit Gravity */
+
+#define ForgetGravity 0
+#define NorthWestGravity 1
+#define NorthGravity 2
+#define NorthEastGravity 3
+#define WestGravity 4
+#define CenterGravity 5
+#define EastGravity 6
+#define SouthWestGravity 7
+#define SouthGravity 8
+#define SouthEastGravity 9
+#define StaticGravity 10
+
+#define NoValue 0x0000
+#define XValue 0x0001
+#define YValue 0x0002
+#define WidthValue 0x0004
+#define HeightValue 0x0008
+#define AllValues 0x000F
+#define XNegative 0x0010
+#define YNegative 0x0020
+
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
+
+#define PPosition (1L << 2) /* program specified position */
+#define PSize (1L << 3) /* program specified size */
+#define PMinSize (1L << 4) /* program specified minimum size */
+#define PMaxSize (1L << 5) /* program specified maximum size */
+#define PResizeInc (1L << 6) /* program specified resize increments */
+#define PAspect (1L << 7) /* program specified min and max aspect ratios */
+#define PBaseSize (1L << 8) /* program specified base for incrementing */
+#define PWinGravity (1L << 9) /* program specified window gravity */
+
+extern int XParseGeometry ();
+
+#endif /* EMACS_MACGUI_H */
+
diff --git a/mac/inc/macterm.h b/mac/inc/macterm.h
new file mode 100644
index 00000000000..7df8a932653
--- /dev/null
+++ b/mac/inc/macterm.h
@@ -0,0 +1,665 @@
+/* Display module for Mac OS.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#include "macgui.h"
+#include "frame.h"
+
+/* The class of this X application. */
+#define EMACS_CLASS "Emacs"
+
+#define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b))
+
+#define RED_FROM_ULONG(color) ((color) >> 16)
+#define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff)
+#define BLUE_FROM_ULONG(color) ((color) & 0xff)
+
+#define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0)
+#define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255)
+
+#define FONT_WIDTH(f) ((f)->max_bounds.width)
+#define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
+#define FONT_BASE(f) ((f)->ascent)
+#define FONT_DESCENT(f) ((f)->descent)
+
+#define FONT_MAX_WIDTH(f) FONT_WIDTH(f) /* fix later */
+
+enum text_cursor_kinds {
+ NO_CURSOR = -1,
+ FILLED_BOX_CURSOR,
+ HOLLOW_BOX_CURSOR,
+ BAR_CURSOR
+};
+
+/* Structure recording bitmaps and reference count.
+ If REFCOUNT is 0 then this record is free to be reused. */
+
+struct mac_bitmap_record
+{
+ char *bitmap_data;
+ int refcount;
+ int height, width;
+};
+
+
+/* For each display (currently only one on mac), we have a structure that
+ records information about it. */
+
+struct mac_display_info
+{
+ /* Chain of all mac_display_info structures. */
+ struct mac_display_info *next;
+
+ /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
+ The same cons cell also appears in x_display_name_list. */
+ Lisp_Object name_list_element;
+
+ /* Number of frames that are on this display. */
+ int reference_count;
+
+ /* Dots per inch of the screen. */
+ double resx, resy;
+
+ /* Number of planes on this screen. */
+ int n_planes;
+
+ /* Number of bits per pixel on this screen. */
+ int n_cbits;
+
+ /* Dimensions of this screen. */
+ int height, width;
+#if 0
+ int height_in,width_in;
+#endif
+
+ /* Mask of things that cause the mouse to be grabbed. */
+ int grabbed;
+
+#if 0
+ /* Emacs bitmap-id of the default icon bitmap for this frame.
+ Or -1 if none has been allocated yet. */
+ int icon_bitmap_id;
+
+#endif
+ /* The root window of this screen. */
+ Window root_window;
+
+ /* The cursor to use for vertical scroll bars. */
+ Cursor vertical_scroll_bar_cursor;
+
+#if 0
+ /* color palette information. */
+ int has_palette;
+ struct w32_palette_entry * color_list;
+ unsigned num_colors;
+ HPALETTE palette;
+
+ /* deferred action flags checked when starting frame update. */
+ int regen_palette;
+
+ /* Keystroke that has been faked by Emacs and will be ignored when
+ received; value is reset after key is received. */
+ int faked_key;
+
+#endif
+
+ /* A table of all the fonts we have already loaded. */
+ struct font_info *font_table;
+
+ /* The current capacity of font_table. */
+ int font_table_size;
+
+ /* The number of fonts actually stored in the font table.
+ font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <=
+ n_fonts <= font_table_size. and font_table[i].name != 0. */
+ int n_fonts;
+
+ /* Minimum width over all characters in all fonts in font_table. */
+ int smallest_char_width;
+
+ /* Minimum font height over all fonts in font_table. */
+ int smallest_font_height;
+
+ /* Reusable Graphics Context for drawing a cursor in a non-default face. */
+ XGCValues *scratch_cursor_gc;
+
+ /* These variables describe the range of text currently shown in its
+ mouse-face, together with the window they apply to. As long as
+ the mouse stays within this range, we need not redraw anything on
+ its account. Rows and columns are glyph matrix positions in
+ MOUSE_FACE_WINDOW. */
+ int mouse_face_beg_row, mouse_face_beg_col;
+ int mouse_face_beg_x, mouse_face_beg_y;
+ int mouse_face_end_row, mouse_face_end_col;
+ int mouse_face_end_x, mouse_face_end_y;
+ int mouse_face_past_end;
+
+ Lisp_Object mouse_face_window;
+
+ int mouse_face_face_id;
+
+ /* 1 if a mouse motion event came and we didn't handle it right away because
+ gc was in progress. */
+ int mouse_face_deferred_gc;
+
+ /* FRAME and X, Y position of mouse when last checked for
+ highlighting. X and Y can be negative or out of range for the frame. */
+ struct frame *mouse_face_mouse_frame;
+
+ int mouse_face_mouse_x, mouse_face_mouse_y;
+
+ /* Nonzero means defer mouse-motion highlighting. */
+ int mouse_face_defer;
+
+ int mouse_face_image_state;
+
+ char *mac_id_name;
+
+ /* Pointer to bitmap records. */
+ struct mac_bitmap_record *bitmaps;
+
+ /* Allocated size of bitmaps field. */
+ int bitmaps_size;
+
+ /* Last used bitmap index. */
+ int bitmaps_last;
+
+ /* The frame (if any) which has the window that has keyboard focus.
+ Zero if none. This is examined by Ffocus_frame in w32fns.c. Note
+ that a mere EnterNotify event can set this; if you need to know the
+ last frame specified in a FocusIn or FocusOut event, use
+ w32_focus_event_frame. */
+ struct frame *x_focus_frame;
+
+ /* The last frame mentioned in a FocusIn or FocusOut event. This is
+ separate from w32_focus_frame, because whether or not LeaveNotify
+ events cause us to lose focus depends on whether or not we have
+ received a FocusIn event for it. */
+ struct frame *x_focus_event_frame;
+
+ /* The frame which currently has the visual highlight, and should get
+ keyboard input (other sorts of input have the frame encoded in the
+ event). It points to the focus frame's selected window's
+ frame. It differs from w32_focus_frame when we're using a global
+ minibuffer. */
+ struct frame *x_highlight_frame;
+
+ /* Cache of images. */
+ struct image_cache *image_cache;
+};
+
+#define x_display_info mac_display_info
+
+/* This is a chain of structures for all the displays currently in use. */
+extern struct mac_display_info one_mac_display_info;
+
+/* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
+ one for each element of w32_display_list and in the same order.
+ NAME is the name of the frame.
+ FONT-LIST-CACHE records previous values returned by x-list-fonts. */
+extern Lisp_Object x_display_name_list;
+
+/* A flag to control how to display unibyte 8-bit character. */
+extern int unibyte_display_via_language_environment;
+
+extern struct x_display_info *x_display_info_for_display P_ ((Display *));
+extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
+
+extern struct mac_display_info *mac_term_init ();
+
+/* The collection of data describing a window on the Mac. Functions
+ defined in macterm.c */
+struct mac_output {
+ WindowPtr mWP; /* pointer to QuickDraw window */
+ FRAME_PTR mFP; /* points back to the frame struct */
+
+#if 0
+ int mNumCols; /* number of characters per column */
+ int mNumRows; /* number of characters per row */
+ int mLineHeight; /* height of one line of text in pixels */
+ int mCharWidth; /* width of one character in pixels */
+ int mHomeX; /* X pixel coordinate of lower left corner of character at (0, 0) */
+ int mHomeY; /* Y pixel coordinate of lower left corner of character at (0, 0) */
+ int mHighlight; /* current highlight state (0 = off). */
+ int mTermWinSize; /* num of lines from top of window affected by ins_del_lines; set by set_terminal_window. */
+#endif
+
+#if 0
+ /* stuffs used by xfaces.c */
+ struct face **param_faces;
+ int n_param_faces;
+ struct face **computed_faces;
+ int n_computed_faces;
+ int size_computed_faces;
+#endif
+
+ unsigned long background_pixel;
+ unsigned long foreground_pixel;
+
+ /* Position of the Mac window (x and y offsets in global coordinates). */
+ int left_pos;
+ int top_pos;
+
+ /* Border width of the W32 window as known by the window system. */
+ int border_width;
+
+ /* Size of the W32 window in pixels. */
+ int pixel_height, pixel_width;
+
+ /* Height of a line, in pixels. */
+ int line_height;
+
+ /* Here are the Graphics Contexts for the default font. */
+ GC normal_gc; /* Normal video */
+ GC reverse_gc; /* Reverse video */
+ GC cursor_gc; /* cursor drawing */
+
+ /* Width of the internal border. This is a line of background color
+ just inside the window's border. When the frame is selected,
+ a highlighting is displayed inside the internal border. */
+ int internal_border_width;
+
+ /* The window used for this frame.
+ May be zero while the frame object is being created
+ and the window has not yet been created. */
+ Window window_desc;
+
+ /* The window that is the parent of this window.
+ Usually this is a window that was made by the window manager,
+ but it can be the root window, and it can be explicitly specified
+ (see the explicit_parent field, below). */
+ Window parent_desc;
+
+ /* Default ASCII font of this frame. */
+ XFontStruct *font;
+
+ /* The baseline offset of the default ASCII font. */
+ int baseline_offset;
+
+ /* If a fontset is specified for this frame instead of font, this
+ value contains an ID of the fontset, else -1. */
+ int fontset;
+
+ /* Pixel values used for various purposes.
+ border_pixel may be -1 meaning use a gray tile. */
+ unsigned long cursor_pixel;
+ unsigned long border_pixel;
+ unsigned long mouse_pixel;
+ unsigned long cursor_foreground_pixel;
+
+ /* Foreground color for scroll bars. A value of -1 means use the
+ default (black for non-toolkit scroll bars). */
+ unsigned long scroll_bar_foreground_pixel;
+
+ /* Background color for scroll bars. A value of -1 means use the
+ default (background color of the frame for non-toolkit scroll
+ bars). */
+ unsigned long scroll_bar_background_pixel;
+
+ /* Descriptor for the cursor in use for this window. */
+ Cursor text_cursor;
+ Cursor nontext_cursor;
+ Cursor modeline_cursor;
+ Cursor cross_cursor;
+ Cursor busy_cursor;
+#if 0
+ /* Window whose cursor is busy_cursor. This window is temporarily
+ mapped to display a busy-cursor. */
+ Window busy_window;
+
+ /* Non-zero means busy cursor is currently displayed. */
+ unsigned busy_p : 1;
+
+ /* Flag to set when the window needs to be completely repainted. */
+ int needs_exposure;
+
+#endif
+
+ /* What kind of text cursor is drawn in this window right now?
+ (If there is no cursor (phys_cursor_x < 0), then this means nothing.) */
+ enum text_cursor_kinds current_cursor;
+
+ /* What kind of text cursor should we draw in the future?
+ This should always be filled_box_cursor or bar_cursor. */
+ enum text_cursor_kinds desired_cursor;
+
+ /* Width of bar cursor (if we are using that). */
+ int cursor_width;
+
+#if 0
+ DWORD dwStyle;
+#endif
+
+ /* The size of the extra width currently allotted for vertical
+ scroll bars, in pixels. */
+ int vertical_scroll_bar_extra;
+
+ /* The extra width currently allotted for the areas in which
+ truncation marks, continuation marks, and overlay arrows are
+ displayed. */
+ int flags_areas_extra;
+
+ /* This is the gravity value for the specified window position. */
+ int win_gravity;
+
+ /* The geometry flags for this window. */
+ int size_hint_flags;
+
+ /* This is the Emacs structure for the display this frame is on. */
+ /* struct w32_display_info *display_info; */
+
+ /* Nonzero means our parent is another application's window
+ and was explicitly specified. */
+ char explicit_parent;
+
+ /* Nonzero means tried already to make this frame visible. */
+ char asked_for_visible;
+
+ /* Nonzero means menubar is currently active. */
+ char menubar_active;
+
+ /* Always contains NULL on the Mac OS because the menu bar is shared. */
+ int menubar_widget;
+
+#if 0
+ /* Nonzero means menubar is about to become active, but should be
+ brought up to date first. */
+ volatile char pending_menu_activation;
+
+#endif
+ /* Relief GCs, colors etc. */
+ struct relief
+ {
+ XGCValues *gc;
+ unsigned long pixel;
+ int allocated_p;
+ }
+ black_relief, white_relief;
+
+ /* The background for which the above relief GCs were set up.
+ They are changed only when a different background is involved. */
+ unsigned long relief_background;
+};
+
+typedef struct mac_output mac_output;
+
+/* Return the Mac window used for displaying data in frame F. */
+#define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP)
+
+#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.mac->foreground_pixel)
+#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.mac->background_pixel)
+
+#define FRAME_FONT(f) ((f)->output_data.mac->font)
+#define FRAME_FONTSET(f) ((f)->output_data.mac->fontset)
+
+#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.mac->internal_border_width)
+#define FRAME_LINE_HEIGHT(f) ((f)->output_data.mac->line_height)
+/* Width of the default font of frame F. Must be defined by each
+ terminal specific header. */
+#define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F))
+#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.mac->baseline_offset)
+
+/* This gives the w32_display_info structure for the display F is on. */
+#define FRAME_MAC_DISPLAY_INFO(f) (&one_mac_display_info)
+#define FRAME_X_DISPLAY_INFO(f) (&one_mac_display_info)
+
+/* This is the `Display *' which frame F is on. */
+#define FRAME_MAC_DISPLAY(f) (0)
+
+/* This is the 'font_info *' which frame F has. */
+#define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table)
+
+/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
+#define PIXEL_WIDTH(f) ((f)->output_data.mac->pixel_width)
+#define PIXEL_HEIGHT(f) ((f)->output_data.mac->pixel_height)
+
+#define FRAME_DESIRED_CURSOR(f) ((f)->output_data.mac->desired_cursor)
+
+/* Value is the smallest width of any character in any font on frame F. */
+
+#define FRAME_SMALLEST_CHAR_WIDTH(F) \
+ FRAME_MAC_DISPLAY_INFO(F)->smallest_char_width
+
+/* Value is the smallest height of any font on frame F. */
+
+#define FRAME_SMALLEST_FONT_HEIGHT(F) \
+ FRAME_MAC_DISPLAY_INFO(F)->smallest_font_height
+
+/* Return a pointer to the image cache of frame F. */
+
+#define FRAME_X_IMAGE_CACHE(F) FRAME_MAC_DISPLAY_INFO ((F))->image_cache
+
+
+/* Pixel width of the bitmaps drawn to indicate truncation,
+ continuation etc. */
+
+#define FRAME_FLAGS_BITMAP_WIDTH(f) 8
+#define FRAME_FLAGS_BITMAP_HEIGHT(f) 8
+
+/* Total width of areas reserved for drawing truncation bitmaps,
+ continuation bitmaps and alike. The width is in canonical char
+ units of the frame. This must currently be the case because window
+ sizes aren't pixel values. If it weren't the case, we wouldn't be
+ able to split windows horizontally nicely. */
+
+#define FRAME_X_FLAGS_AREA_COLS(F) \
+ ((2 * FRAME_FLAGS_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1) \
+ / CANON_X_UNIT ((F)))
+
+/* Total width of flags areas in pixels. */
+
+#define FRAME_X_FLAGS_AREA_WIDTH(F) \
+ (FRAME_X_FLAGS_AREA_COLS ((F)) * CANON_X_UNIT ((F)))
+
+/* Pixel-width of the left flags area. */
+
+#define FRAME_X_LEFT_FLAGS_AREA_WIDTH(F) \
+ (FRAME_X_FLAGS_AREA_WIDTH (F) / 2)
+
+/* Pixel-width of the right flags area. Note that we are doing
+ integer arithmetic here, so don't loose a pixel if the total
+ width is an odd number. */
+
+#define FRAME_X_RIGHT_FLAGS_AREA_WIDTH(F) \
+ (FRAME_X_FLAGS_AREA_WIDTH (F) - FRAME_X_FLAGS_AREA_WIDTH (F) / 2)
+
+
+
+/* Mac-specific scroll bar stuff. */
+
+/* We represent scroll bars as lisp vectors. This allows us to place
+ references to them in windows without worrying about whether we'll
+ end up with windows referring to dead scroll bars; the garbage
+ collector will free it when its time comes.
+
+ We use struct scroll_bar as a template for accessing fields of the
+ vector. */
+
+struct scroll_bar {
+
+ /* These fields are shared by all vectors. */
+ EMACS_INT size_from_Lisp_Vector_struct;
+ struct Lisp_Vector *next_from_Lisp_Vector_struct;
+
+ /* The window we're a scroll bar for. */
+ Lisp_Object window;
+
+ /* The next and previous in the chain of scroll bars in this frame. */
+ Lisp_Object next, prev;
+
+ /* The Mac control handle of this scroll bar. Since this is a full
+ 32-bit quantity, we store it split into two 32-bit values. */
+ Lisp_Object control_handle_low, control_handle_high;
+
+ /* The position and size of the scroll bar in pixels, relative to the
+ frame. */
+ Lisp_Object top, left, width, height;
+
+ /* The starting and ending positions of the handle, relative to the
+ handle area (i.e. zero is the top position, not
+ SCROLL_BAR_TOP_BORDER). If they're equal, that means the handle
+ hasn't been drawn yet.
+
+ These are not actually the locations where the beginning and end
+ are drawn; in order to keep handles from becoming invisible when
+ editing large files, we establish a minimum height by always
+ drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below
+ where they would be normally; the bottom and top are in a
+ different co-ordinate system. */
+ Lisp_Object start, end;
+
+ /* If the scroll bar handle is currently being dragged by the user,
+ this is the number of pixels from the top of the handle to the
+ place where the user grabbed it. If the handle isn't currently
+ being dragged, this is Qnil. */
+ Lisp_Object dragging;
+};
+
+/* The number of elements a vector holding a struct scroll_bar needs. */
+#define SCROLL_BAR_VEC_SIZE \
+ ((sizeof (struct scroll_bar) \
+ - sizeof (EMACS_INT) - sizeof (struct Lisp_Vector *)) \
+ / sizeof (Lisp_Object))
+
+/* Turning a lisp vector value into a pointer to a struct scroll_bar. */
+#define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
+
+
+/* Building a 32-bit C integer from two 16-bit lisp integers. */
+#define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low))
+
+/* Setting two lisp integers to the low and high words of a 32-bit C int. */
+#define SCROLL_BAR_UNPACK(low, high, int32) \
+ (XSETINT ((low), (int32) & 0xffff), \
+ XSETINT ((high), ((int32) >> 16) & 0xffff))
+
+
+/* Extract the Mac control handle of the scroll bar from a struct scroll_bar. */
+#define SCROLL_BAR_CONTROL_HANDLE(ptr) \
+ ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, (ptr)->control_handle_high))
+
+/* Store a Mac control handle in a struct scroll_bar. */
+#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \
+ (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, (ptr)->control_handle_high, (int) id))
+
+/* Return the inside width of a vertical scroll bar, given the outside
+ width. */
+#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f,width) \
+ ((width) \
+ - VERTICAL_SCROLL_BAR_LEFT_BORDER \
+ - VERTICAL_SCROLL_BAR_RIGHT_BORDER \
+ - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2)
+
+/* Return the length of the rectangle within which the top of the
+ handle must stay. This isn't equivalent to the inside height,
+ because the scroll bar handle has a minimum height.
+
+ This is the real range of motion for the scroll bar, so when we're
+ scaling buffer positions to scroll bar positions, we use this, not
+ VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */
+#define VERTICAL_SCROLL_BAR_TOP_RANGE(f,height) \
+ (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) - VERTICAL_SCROLL_BAR_MIN_HANDLE - UP_AND_DOWN_ARROWS)
+
+/* Return the inside height of vertical scroll bar, given the outside
+ height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */
+#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f,height) \
+ ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
+
+
+/* Border widths for scroll bars.
+
+ Scroll bar windows don't have any borders; their border width is
+ set to zero, and we redraw borders ourselves. This makes the code
+ a bit cleaner, since we don't have to convert between outside width
+ (used when relating to the rest of the screen) and inside width
+ (used when sizing and drawing the scroll bar window itself).
+
+ The handle moves up and down/back and forth in a rectangle inset
+ from the edges of the scroll bar. These are widths by which we
+ inset the handle boundaries from the scroll bar edges. */
+#define VERTICAL_SCROLL_BAR_LEFT_BORDER (0)
+#define VERTICAL_SCROLL_BAR_RIGHT_BORDER (0)
+#define VERTICAL_SCROLL_BAR_TOP_BORDER (0)
+#define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (0)
+
+/* Minimum lengths for scroll bar handles, in pixels. */
+#define VERTICAL_SCROLL_BAR_MIN_HANDLE (16)
+
+/* Combined length of up and down arrow boxes in scroll bars, in pixels. */
+#define UP_AND_DOWN_ARROWS (32)
+
+/* Trimming off a few pixels from each side prevents
+ text from glomming up against the scroll bar */
+#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
+
+
+/* Manipulating pixel sizes and character sizes.
+ Knowledge of which factors affect the overall size of the window should
+ be hidden in these macros, if that's possible.
+
+ Return the upper/left pixel position of the character cell on frame F
+ at ROW/COL. */
+#define CHAR_TO_PIXEL_ROW(f, row) \
+ ((f)->output_data.mac->internal_border_width \
+ + (row) * (f)->output_data.mac->line_height)
+#define CHAR_TO_PIXEL_COL(f, col) \
+ ((f)->output_data.mac->internal_border_width \
+ + (col) * FONT_WIDTH ((f)->output_data.mac->font))
+
+/* Return the pixel width/height of frame F if it has
+ WIDTH columns/HEIGHT rows. */
+#define CHAR_TO_PIXEL_WIDTH(f, width) \
+ (CHAR_TO_PIXEL_COL (f, width) \
+ + (f)->output_data.mac->vertical_scroll_bar_extra \
+ + (f)->output_data.mac->flags_areas_extra \
+ + (f)->output_data.mac->internal_border_width)
+#define CHAR_TO_PIXEL_HEIGHT(f, height) \
+ (CHAR_TO_PIXEL_ROW (f, height) \
+ + (f)->output_data.mac->internal_border_width)
+
+
+/* Return the row/column (zero-based) of the character cell containing
+ the pixel on FRAME at ROW/COL. */
+#define PIXEL_TO_CHAR_ROW(f, row) \
+ (((row) - (f)->output_data.mac->internal_border_width) \
+ / (f)->output_data.mac->line_height)
+#define PIXEL_TO_CHAR_COL(f, col) \
+ (((col) - (f)->output_data.mac->internal_border_width) \
+ / FONT_WIDTH ((f)->output_data.mac->font))
+
+/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
+ frame F? */
+#define PIXEL_TO_CHAR_WIDTH(f, width) \
+ (PIXEL_TO_CHAR_COL (f, ((width) \
+ - (f)->output_data.mac->internal_border_width \
+ - (f)->output_data.mac->flags_areas_extra \
+ - (f)->output_data.mac->vertical_scroll_bar_extra)))
+#define PIXEL_TO_CHAR_HEIGHT(f, height) \
+ (PIXEL_TO_CHAR_ROW (f, ((height) \
+ - (f)->output_data.mac->internal_border_width)))
+
+struct frame * check_x_frame (Lisp_Object);
+
+/* Dummy entry for defining tty_display in frame.c. */
+struct x_output
+{
+ char _dummy;
+};
diff --git a/mac/inc/pwd.h b/mac/inc/pwd.h
new file mode 100644
index 00000000000..8e6a5dece34
--- /dev/null
+++ b/mac/inc/pwd.h
@@ -0,0 +1,37 @@
+/* Replacement pwd.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _PWD_H
+#define _PWD_H
+
+#include <sys/types.h>
+
+/* Emacs uses only pw_name and pw_dir: let's just simulate these */
+struct passwd {
+ char *pw_name; /* user name */
+ char *pw_dir; /* home directory */
+};
+
+struct passwd *getpwuid(uid_t);
+struct passwd *getpwnam(const char *);
+
+#endif /* _PWD_H */
diff --git a/mac/inc/s-mac.h b/mac/inc/s-mac.h
new file mode 100644
index 00000000000..3780664f74e
--- /dev/null
+++ b/mac/inc/s-mac.h
@@ -0,0 +1,320 @@
+/* Handcrafted s-mac.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+/* #define UNIPLUS */
+/* #define USG5 */
+/* #define USG */
+/* #define HPUX */
+/* #define UMAX */
+/* #define BSD4_1 */
+/* #define BSD4_2 */
+/* #define BSD4_3 */
+/* #define BSD_SYSTEM */
+/* #define VMS */
+
+/* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+#define SYSTEM_TYPE "macos"
+
+/* NOMULTIPLEJOBS should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+#define NOMULTIPLEJOBS
+
+/* Emacs can read input using SIGIO and buffering characters itself,
+ or using CBREAK mode and making C-g cause SIGINT.
+ The choice is controlled by the variable interrupt_input.
+
+ Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
+
+ Emacs uses the presence or absence of the SIGIO macro to indicate
+ whether or not signal-driven I/O is possible. It uses
+ INTERRUPT_INPUT to decide whether to use it by default.
+
+ SIGIO can be used only on systems that implement it (4.2 and 4.3).
+ CBREAK mode has two disadvantages
+ 1) At least in 4.2, it is impossible to handle the Meta key properly.
+ I hear that in system V this problem does not exist.
+ 2) Control-G causes output to be discarded.
+ I do not know whether this can be fixed in system V.
+
+ Another method of doing input is planned but not implemented.
+ It would have Emacs fork off a separate process
+ to read the input and send it to the true Emacs process
+ through a pipe. */
+
+/* #define INTERRUPT_INPUT */
+
+/* Letter to use in finding device name of first pty,
+ if system supports pty's. 'a' means it is /dev/ptya0 */
+
+/* #define FIRST_PTY_LETTER 'a' */
+
+/*
+ * Define HAVE_TERMIOS if the system provides POSIX-style
+ * functions and macros for terminal control.
+ *
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ *
+ * Do not define both. HAVE_TERMIOS is preferred, if it is
+ * supported on your system.
+ */
+
+/* #define HAVE_TERMIOS */
+#define HAVE_TERMIO
+
+/*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+/* #define HAVE_PTYS */
+
+/*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+/* #define NONSYSTEM_DIR_LIBRARY */
+
+/* Define this symbol if your system has the functions bcopy, etc. */
+
+/* #define BSTRING */
+
+/* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is generally OS dependent, and not supported
+ under most USG systems. */
+
+/* #define subprocesses */
+
+/* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+/* #define COFF */
+
+/* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+/* #define MAIL_USE_FLOCK */
+
+/* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+/* #define CLASH_DETECTION */
+
+/* Define this if your operating system declares signal handlers to
+ have a type other than the usual. `The usual' is `void' for ANSI C
+ systems (i.e. when the __STDC__ macro is defined), and `int' for
+ pre-ANSI systems. If you're using GCC on an older system, __STDC__
+ will be defined, but the system's include files will still say that
+ signal returns int or whatever; in situations like that, define
+ this to be what the system's include files want. */
+/* #define SIGTYPE int */
+
+/* If the character used to separate elements of the executable path
+ is not ':', #define this to be the appropriate character constant. */
+/* #define SEPCHAR ':' */
+
+/* ============================================================ */
+
+/* Here, add any special hacks needed
+ to make Emacs work on this system. For example,
+ you might define certain system call names that don't
+ exist on your system, or that do different things on
+ your system and must be used only through an encapsulation
+ (Which you should place, by convention, in sysdep.c). */
+
+/* Some compilers tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ On these systems, you must #define static as nothing to foil this.
+ Note that emacs carefully avoids static vars inside functions. */
+
+/* #define static */
+
+/* ============================================================ */
+
+/* After adding support for a new system, modify the large case
+ statement in the `configure' script to recognize reasonable
+ configuration names, and add a description of the system to
+ `etc/MACHINES'.
+
+ If you've just fixed a problem in an existing configuration file,
+ you should also check `etc/MACHINES' to make sure its descriptions
+ of known problems in that configuration should be updated. */
+
+#ifdef __MRC__
+#define __signal_max SIGTERM /* largest one in signal.h */
+#endif
+
+#define SIGHUP (__signal_max+1)
+#define SIGQUIT (__signal_max+2)
+#define SIGTRAP (__signal_max+3)
+#define SIGKILL (__signal_max+4)
+#define SIGALRM (__signal_max+5)
+#define SIGPIPE (__signal_max+6)
+#define NSIG (__signal_max+6)
+
+#ifdef __MRC__
+#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
+#elif __MWERKS__
+#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->buffer_ptr - (FILE)->buffer)
+#endif
+
+#ifdef __MWERKS__
+#include <errno.h>
+#ifndef ENOENT
+#define ENOENT 100
+#endif
+#ifndef EXDEV
+#define EXDEV 101
+#endif
+#ifndef EEXIST
+#define EEXIST 102
+#endif
+#ifndef EINTR
+#define EINTR 102
+#endif
+#ifndef EACCES
+#define EACCES 103
+#endif
+#ifndef ENOTDIR
+#define ENOTDIR 104
+#endif
+#ifndef EIO
+#define EIO 105
+#endif
+#ifndef EBADF
+#define EBADF 106
+#endif
+#endif
+
+#define SYSTEM_PURESIZE_EXTRA (200*1024)
+
+/* don't know what this will do, but sysdep.c needs it */
+#define DATA_START 0
+
+/* Limited by CW's 32K limit on local data! */
+#define READ_BUF_SIZE (8 << 10)
+
+#include <utsname.h>
+void read_input_waiting ();
+
+/* #define GETTIMEOFDAY_ONE_ARGUMENT */
+
+#define SYSV_SYSTEM_DIR
+
+#define SYSTEM_MALLOC
+
+/* Constants such as O_RDONLY are defined in fcntl.h. Best solution is
+ really to patch individual files to include it: callproc.c, doc.c,
+ fileio.c, getloadavg.c, lread.c, and termcap.c. */
+#include <fcntl.h>
+
+#define _setjmp setjmp
+#define _longjmp longjmp
+
+#define _exit exit
+
+#define main emacs_main
+
+/* Include this here so it won't be include again when #include in emacs
+ sources. Then undefine the macro definitions in it for unlink, read,
+ write, access, and rmdir. */
+#ifdef __MWERKS__
+#include <unistd.h>
+#endif
+
+#undef unlink
+#define unlink sys_unlink
+#undef read
+#define read sys_read
+#undef write
+#define write sys_write
+#undef access
+#define access sys_access
+#undef rmdir
+#define rmdir sys_rmdir
+
+#define open sys_open
+#define creat sys_creat
+
+#define rename sys_rename
+#define fopen sys_fopen
+#define signal sys_signal
+
+#define gmtime sys_gmtime
+#define localtime sys_localtime
+#define ctime sys_ctime
+#define time sys_time
+
+#ifndef bcmp
+#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
+#endif
+#ifndef bcopy
+#define bcopy(s, d, n) memcpy ((d), (s), (n))
+#endif
+#ifndef bzero
+#define bzero(s, n) memset ((s), 0, (n))
+#endif
+
+extern char *index (const char *, int);
+
+/* MPW strftime broken for "%p" format */
+#ifdef __MRC__
+#define strftime sys_strftime
+#endif
+
+#include <time.h>
+/* Editfns.c includes types.h which indirectly includes time.h before config.h.
+ So gmtime (localtime) is defined and not sys_gmtime (sys_localtime). Define
+ here explicitly. */
+extern struct tm *sys_gmtime (const time_t *);
+extern struct tm *sys_localtime (const time_t *);
+extern char *sys_ctime (const time_t *);
+extern time_t sys_time (time_t *);
+
+/* Emacs.c includes signal.h before config.h. Define this to make it happy. */
+#ifdef __MRC__
+#include <signal.h>
+extern __sigfun sys_signal (int signal_num, __sigfun signal_func);
+#elif __MWERKS__
+#include <signal.h>
+extern __signal_func_ptr sys_signal (int signal_num, __signal_func_ptr signal_func);
+#endif
+
+extern double atof (const char *);
+
+#define volatile
+
+#define SYMS_SYSTEM syms_of_mac()
diff --git a/mac/inc/sys/file.h b/mac/inc/sys/file.h
new file mode 100644
index 00000000000..c37d7006d48
--- /dev/null
+++ b/mac/inc/sys/file.h
@@ -0,0 +1,59 @@
+/* Replacement sys/file.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_FILE_H
+#define _SYS_FILE_H
+
+#include <Files.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __MRC__
+#undef open
+#undef creat
+
+#define open mpw_open
+#define creat mpw_creat
+
+#include <fcntl.h>
+
+#undef open
+#undef creat
+
+#define open sys_open
+#define creat sys_creat
+#endif
+
+#ifdef __MWERKS__
+#include <unix.h>
+#endif
+
+mode_t umask(mode_t);
+
+void abort(void);
+void _exit(int);
+int kill(int,int);
+int alarm(int);
+int pause(void);
+char *getwd(char *);
+
+#endif /* _SYS_FILE_H */
diff --git a/mac/inc/sys/ioctl.h b/mac/inc/sys/ioctl.h
new file mode 100644
index 00000000000..116e7bf5b06
--- /dev/null
+++ b/mac/inc/sys/ioctl.h
@@ -0,0 +1,31 @@
+/* Replacement sys/ioctl.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_IOCTL_H
+#define _SYS_IOCTL_H
+
+int ioctl(int, int, void *);
+
+#define FIONREAD 1
+#define TCGETA 2
+
+#endif /* _SYS_IOCTL_H */
diff --git a/mac/inc/sys/param.h b/mac/inc/sys/param.h
new file mode 100644
index 00000000000..7a39b149366
--- /dev/null
+++ b/mac/inc/sys/param.h
@@ -0,0 +1,28 @@
+/* Replacement sys/param.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_PARAM_H
+#define _SYS_PARAM_H
+
+#define MAXPATHLEN 255
+
+#endif /* _SYS_PARAM_H */
diff --git a/mac/inc/sys/stat.h b/mac/inc/sys/stat.h
new file mode 100644
index 00000000000..fe3dc5df669
--- /dev/null
+++ b/mac/inc/sys/stat.h
@@ -0,0 +1,86 @@
+/* Replacement sys/stat.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_STAT_H
+#define _SYS_STAT_H
+
+#ifdef __MWERKS__
+#include <stat.mac.h>
+
+#ifdef CODEWARRIOR_VERSION_6
+#define fstat _fstat
+#endif
+
+#undef S_IFMT
+#undef S_IFBLK
+#undef S_IFCHR
+#undef S_IFIFO
+#undef S_IFREG
+#undef S_IFDIR
+#undef S_IFLNK
+
+#undef S_IRUSR
+#undef S_IWUSR
+#undef S_IXUSR
+
+#endif /* __MWERKS__ */
+
+/* Need to redefine these for CW, filemode.c assumes Unix definitions which are
+ inconsistent with CW definitions because CW uses bits 8-12 for S_IFMT info.
+ Bit 8 is used by S_IRUSR on Unix! */
+#define S_IFMT 0170000 /* type of file */
+#define S_IFBLK 0060000 /* block special */
+#define S_IFCHR 0020000 /* character special */
+#define S_IFIFO 0010000 /* FIFO special */
+#define S_IFREG 0100000 /* regular */
+#define S_IFDIR 0040000 /* directory */
+#define S_IFLNK 0030000 /* symbolic link */
+
+#define S_IREAD 00400
+#define S_IWRITE 00200
+#define S_IEXEC 00100
+
+/* Need to redefine these for because mode_string in filemode.c assumes Unix
+ values in the lower 9 bits which are different from CW values. */
+#define S_IRUSR S_IREAD
+#define S_IWUSR S_IWRITE
+#define S_IXUSR S_IEXEC
+
+#ifdef __MRC__
+typedef unsigned long dev_t;
+
+struct stat {
+ dev_t st_dev; /* ID of device containing file */
+ int st_ino; /* file serial number */
+ unsigned short st_mode; /* mode of file */
+ int st_nlink; /* number of links to the file */
+ int st_uid; /* user ID of file */
+ int st_gid; /* group ID of file */
+ int st_rdev; /* device ID (if file is character or block special) */
+ int st_size; /* file size in bytes (if file is a regular file) */
+ int st_atime; /* time of last access */
+ int st_mtime; /* time of last data modification */
+ int st_ctime; /* time of last status change */
+};
+#endif /* __MRC__ */
+
+#endif /* _SYS_STAT_H */
diff --git a/mac/inc/sys/time.h b/mac/inc/sys/time.h
new file mode 100644
index 00000000000..5c55c09b5cd
--- /dev/null
+++ b/mac/inc/sys/time.h
@@ -0,0 +1,31 @@
+/* Replacement sys/time.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_TIME_H
+#define _SYS_TIME_H
+
+struct timeval {
+ long tv_sec; /* seconds */
+ long tv_usec; /* microseconds */
+};
+
+#endif /* _SYS_TYPES_H */
diff --git a/mac/inc/sys/types.h b/mac/inc/sys/types.h
new file mode 100644
index 00000000000..71eb976f3b2
--- /dev/null
+++ b/mac/inc/sys/types.h
@@ -0,0 +1,40 @@
+/* Replacement sys/types.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_TYPES_H
+#define _SYS_TYPES_H
+
+#ifdef __MWERKS__
+/* Need definitions of uid_t from stat.h */
+#include <stat.h>
+#endif /* __MWERKS__ */
+
+#ifdef __MRC__
+typedef long uid_t;
+typedef long gid_t;
+typedef long off_t;
+typedef long ino_t;
+
+typedef unsigned long mode_t;
+#endif /* __MRC__ */
+
+#endif /* _SYS_TYPES_H */
diff --git a/mac/inc/termio.h b/mac/inc/termio.h
new file mode 100644
index 00000000000..3f194e59af4
--- /dev/null
+++ b/mac/inc/termio.h
@@ -0,0 +1,68 @@
+/* Replacement termio.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _SYS_TERMIO_H
+#define _SYS_TERMIO_H
+
+typedef unsigned char cc_t;
+typedef unsigned short tcflag_t;
+
+#define NCCS 32
+
+struct termio {
+ tcflag_t c_iflag; /* input modes */
+ tcflag_t c_oflag; /* output modes */
+ tcflag_t c_cflag; /* control modes */
+ tcflag_t c_lflag; /* local modes */
+ cc_t c_cc[NCCS]; /* control chars */
+};
+
+/* c_cc subscript names */
+#define VINTR 1
+#define VQUIT 2
+#define VERASE 3
+#define VTIME 4
+#define VMIN 5
+
+/* c_iflag fields */
+#define IGNBRK 0x1 /* ignore break condition */
+#define ICRNL 0x2 /* map CR to NL on input */
+#define IXON 0x4 /* enable start/stop output control */
+
+/* c_oflag fields */
+#define ONLCR 0x1 /* map CR to NL on output */
+#define TABDLY 0x2 /* horizontal tab delays */
+#define TAB3 0x4 /* expand tab to spaces */
+
+/* c_cflag fields */
+#define CBAUD 0x1
+#define B9600 0x2
+
+/* c_lflag fields */
+#define ISIG 0x1 /* enable signals */
+#define ICANON 0x2 /* canonical input (erase and kill processing) */
+#define ECHO 0x3 /* enable echo */
+
+#define TCSETAW 4
+#define TCSETAF 5
+
+#endif /* _SYS_TERMIO_H */
diff --git a/mac/inc/utime.h b/mac/inc/utime.h
new file mode 100644
index 00000000000..8cb65ec5f80
--- /dev/null
+++ b/mac/inc/utime.h
@@ -0,0 +1,37 @@
+/* Replacement utime.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _UTIME_H_
+#define _UTIME_H_
+
+#include <time.h>
+
+#define _mac_unix_epoch_offset_ (365L * 4L) * 24L * 60L * 60L
+
+struct utimbuf {
+ time_t actime; /* access time (ignored on the Mac) */
+ time_t modtime; /* modification time */
+};
+
+int utime(const char *path, const struct utimbuf *buf);
+
+#endif
diff --git a/mac/inc/utsname.h b/mac/inc/utsname.h
new file mode 100644
index 00000000000..fec32be7421
--- /dev/null
+++ b/mac/inc/utsname.h
@@ -0,0 +1,32 @@
+/* Replacement utsname.h file for building GNU Emacs on the Macintosh.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
+
+#ifndef _UTSNAME_H
+#define _UTSNAME_H
+
+struct utsname {
+ char nodename[255];
+};
+
+int uname(struct utsname *name);
+
+#endif