]> code.delx.au - gnu-emacs/blobdiff - src/s/darwin.h
(text_read_only): Use xsignal0, xsignal1.
[gnu-emacs] / src / s / darwin.h
index d8da3e3174c60eb7032267697c5c6d206606b01b..91975cd441b883855d508e35e541899574dc9711 100644 (file)
@@ -1,5 +1,6 @@
 /* System description header file for Darwin (Mac OS X).
-   Copyright (C) 2001, 02, 2004  Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005,
+                 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -15,8 +16,8 @@ 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.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 
 /*
@@ -37,6 +38,13 @@ Boston, MA 02111-1307, USA.  */
 #define BSD_SYSTEM
 /* #define VMS */
 
+#if 0 /* Don't define DARWIN on Mac OS X because CoreFoundation.h uses
+        it to distinguish Mac OS X from bare Darwin.  */
+#ifndef        DARWIN
+#define        DARWIN 1
+#endif
+#endif
+
 /* MAC_OS is used to conditionally compile code common to both MAC_OS8
    and MAC_OSX.  */
 #ifdef MAC_OSX
@@ -103,25 +111,17 @@ Boston, MA 02111-1307, USA.  */
 
 /*
  *     Define HAVE_PTYS if the system supports pty devices.
+ *      Note: PTYs are broken on darwin <6.  Use at your own risk.
  */
 
 #define HAVE_PTYS
 
-
-/*
- * PTYs only work correctly on Darwin 7 or higher.  So make PTY_ITERATION
- * Test the operating system release and only allow PTYs if it is greater
- * than 7.
+/**
+ * PTYs only work correctly on Darwin 7 or higher.  So make the
+ * default for process-connection-type dependent on the kernel
+ * version.
  */
 #define MIN_PTY_KERNEL_VERSION '7' 
-#define PTY_ITERATION  \
-  char *release = get_operating_system_release();      \
-  if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION \
-                                 && release[1] == '.'))              \
-    return -1; \
-  for (c = FIRST_PTY_LETTER; c <= 'z'; c++)    \
-    for (i = 0; i < 16; i++)
-
 
 /*
  *     Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
@@ -264,13 +264,13 @@ Boston, MA 02111-1307, USA.  */
 
 /* Indicate that we are compiling for Mac OS X and where to find Mac
    specific headers.  */
-#define C_SWITCH_SYSTEM -fpascal-strings -fno-common -DMAC_OSX -I../mac/src
+#define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX -I../mac/src
 
 /* Link in the Carbon lib. */
 #ifdef HAVE_CARBON
 #define LIBS_CARBON -framework Carbon -framework QuickTime
 #else
-#define LIBS_CARBON -framework Carbon
+#define LIBS_CARBON
 #endif
 
 /* The -headerpad option tells ld (see man page) to leave room at the
@@ -329,6 +329,10 @@ struct kboard;
    does not exist.  */
 #undef HAVE_WORKING_VFORK
 #define vfork fork
+
+/* Don't close pty in process.c to make it as controlling terminal.
+   It is already a controlling terminal of subprocess, because we did
+   ioctl TIOCSCTTY.  */
 #define DONT_REOPEN_PTY
 
 #ifdef temacs