summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2002-05-20 10:24:07 (GMT)
committerdas <das>2002-05-20 10:24:07 (GMT)
commit7f26617845362ddd789dfc8576d1d3276315ff49 (patch)
tree10041aa2802e465fd663597723aa782f7fc3c5a4
parent7c1cb95bfeff4c82134b0833b624b2b1bbce2ecc (diff)
downloadtcl-7f26617845362ddd789dfc8576d1d3276315ff49.zip
tcl-7f26617845362ddd789dfc8576d1d3276315ff49.tar.gz
tcl-7f26617845362ddd789dfc8576d1d3276315ff49.tar.bz2
* mac/tclMacChan.c: use MSL provided creator type if available
instead of the default 'MPW '.
-rw-r--r--ChangeLog5
-rw-r--r--mac/tclMacChan.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3378d38..6ab057a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-20 Daniel Steffen <das@users.sourceforge.net>
+
+ * mac/tclMacChan.c: use MSL provided creator type if available
+ instead of the default 'MPW '.
+
2002-04-26 Jeff Hobbs <jeffh@ActiveState.com>
* unix/configure:
diff --git a/mac/tclMacChan.c b/mac/tclMacChan.c
index 838d8dc..c9999be 100644
--- a/mac/tclMacChan.c
+++ b/mac/tclMacChan.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacChan.c,v 1.6.12.1 2001/04/04 21:22:19 hobbs Exp $
+ * RCS: @(#) $Id: tclMacChan.c,v 1.6.12.2 2002/05/20 10:24:12 das Exp $
*/
#include "tclInt.h"
@@ -25,6 +25,12 @@
#include <MoreFiles.h>
#include <MoreFilesExtras.h>
+#ifdef __MSL__
+#include <unix.mac.h>
+#define TCL_FILE_CREATOR (__getcreator(0))
+#else
+#define TCL_FILE_CREATOR 'MPW '
+#endif
/*
* The following are flags returned by GetOpenMode. They
@@ -862,7 +868,7 @@ OpenFileChannel(
}
if ((err == fnfErr) && (mode & TCL_CREAT)) {
- err = HCreate(fileSpec.vRefNum, fileSpec.parID, fileSpec.name, 'MPW ', 'TEXT');
+ err = HCreate(fileSpec.vRefNum, fileSpec.parID, fileSpec.name, TCL_FILE_CREATOR, 'TEXT');
if (err != noErr) {
*errorCodePtr = errno = TclMacOSErrorToPosixError(err);
Tcl_SetErrno(errno);