summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-24 10:59:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-24 10:59:21 (GMT)
commit3f3b063fc15a47c803a2c5d2fb14f719b256dba9 (patch)
tree37eea9bfef2ce764854eaebeaffa52db943564a8
parente1c726c81937a898424ddc4efeb08262ccd4755e (diff)
parent6a93c7f3706002c1f0ac2408515c9f87ef9cdeef (diff)
downloadtcl-3f3b063fc15a47c803a2c5d2fb14f719b256dba9.zip
tcl-3f3b063fc15a47c803a2c5d2fb14f719b256dba9.tar.gz
tcl-3f3b063fc15a47c803a2c5d2fb14f719b256dba9.tar.bz2
Merge 8.6. If compiled with -DTCL_NO_DEPRECATED, remove Tcl_MacOSXOpenBundleResources() completely
-rw-r--r--generic/tclInt.decls15
-rw-r--r--generic/tclIntPlatDecls.h75
-rw-r--r--generic/tclPlatDecls.h5
-rw-r--r--generic/tclStubInit.c25
-rw-r--r--macosx/tclMacOSXBundle.c3
5 files changed, 88 insertions, 35 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 5640fab..abb8c38 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1250,26 +1250,29 @@ declare 14 unix {
################################
# Mac OS X specific functions
-declare 15 macosx {
+declare 15 {unix macosx} {
int TclMacOSXGetFileAttribute(Tcl_Interp *interp, int objIndex,
Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)
}
-declare 16 macosx {
+declare 16 {unix macosx} {
int TclMacOSXSetFileAttribute(Tcl_Interp *interp, int objIndex,
Tcl_Obj *fileName, Tcl_Obj *attributePtr)
}
-declare 17 macosx {
+declare 17 {unix macosx} {
int TclMacOSXCopyFileAttributes(const char *src, const char *dst,
const Tcl_StatBuf *statBufPtr)
}
-declare 18 macosx {
+declare 18 {unix macosx} {
int TclMacOSXMatchType(Tcl_Interp *interp, const char *pathName,
const char *fileName, Tcl_StatBuf *statBufPtr,
Tcl_GlobTypeData *types)
}
-declare 19 macosx {
+declare 19 {unix macosx} {
void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode)
}
+declare 22 {unix macosx} {
+ TclFile TclpCreateTempFile_(const char *contents)
+}
declare 29 {win unix} {
int TclWinCPUID(int index, int *regs)
@@ -1279,8 +1282,6 @@ declare 30 {win unix} {
int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj, Tcl_Obj *basenameObj,
Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj)
}
-
-
# Local Variables:
# mode: tcl
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 51d2f65..01c17f4 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -78,14 +78,30 @@ EXTERN char * TclpInetNtoa(struct in_addr addr);
EXTERN int TclUnixCopyFile(const char *src, const char *dst,
const Tcl_StatBuf *statBufPtr,
int dontCopyAtts);
-/* Slot 15 is reserved */
-/* Slot 16 is reserved */
-/* Slot 17 is reserved */
-/* Slot 18 is reserved */
-/* Slot 19 is reserved */
+/* 15 */
+EXTERN int TclMacOSXGetFileAttribute(Tcl_Interp *interp,
+ int objIndex, Tcl_Obj *fileName,
+ Tcl_Obj **attributePtrPtr);
+/* 16 */
+EXTERN int TclMacOSXSetFileAttribute(Tcl_Interp *interp,
+ int objIndex, Tcl_Obj *fileName,
+ Tcl_Obj *attributePtr);
+/* 17 */
+EXTERN int TclMacOSXCopyFileAttributes(const char *src,
+ const char *dst,
+ const Tcl_StatBuf *statBufPtr);
+/* 18 */
+EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
+ const char *pathName, const char *fileName,
+ Tcl_StatBuf *statBufPtr,
+ Tcl_GlobTypeData *types);
+/* 19 */
+EXTERN void TclMacOSXNotifierAddRunLoopMode(
+ const void *runLoopMode);
/* Slot 20 is reserved */
/* Slot 21 is reserved */
-/* Slot 22 is reserved */
+/* 22 */
+EXTERN TclFile TclpCreateTempFile_(const char *contents);
/* Slot 23 is reserved */
/* Slot 24 is reserved */
/* Slot 25 is reserved */
@@ -234,7 +250,8 @@ EXTERN void TclMacOSXNotifierAddRunLoopMode(
const void *runLoopMode);
/* Slot 20 is reserved */
/* Slot 21 is reserved */
-/* Slot 22 is reserved */
+/* 22 */
+EXTERN TclFile TclpCreateTempFile_(const char *contents);
/* Slot 23 is reserved */
/* Slot 24 is reserved */
/* Slot 25 is reserved */
@@ -269,14 +286,14 @@ typedef struct TclIntPlatStubs {
struct tm * (*tclpGmtime_unix) (const time_t *clock); /* 12 */
char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */
int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */
- void (*reserved15)(void);
- void (*reserved16)(void);
- void (*reserved17)(void);
- void (*reserved18)(void);
- void (*reserved19)(void);
+ int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */
+ int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */
+ int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */
+ int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
+ void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
void (*reserved20)(void);
void (*reserved21)(void);
- void (*reserved22)(void);
+ TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
void (*reserved23)(void);
void (*reserved24)(void);
void (*reserved25)(void);
@@ -342,7 +359,7 @@ typedef struct TclIntPlatStubs {
void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
void (*reserved20)(void);
void (*reserved21)(void);
- void (*reserved22)(void);
+ TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
void (*reserved23)(void);
void (*reserved24)(void);
void (*reserved25)(void);
@@ -396,14 +413,20 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
(tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */
#define TclUnixCopyFile \
(tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */
-/* Slot 15 is reserved */
-/* Slot 16 is reserved */
-/* Slot 17 is reserved */
-/* Slot 18 is reserved */
-/* Slot 19 is reserved */
+#define TclMacOSXGetFileAttribute \
+ (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */
+#define TclMacOSXSetFileAttribute \
+ (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */
+#define TclMacOSXCopyFileAttributes \
+ (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */
+#define TclMacOSXMatchType \
+ (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */
+#define TclMacOSXNotifierAddRunLoopMode \
+ (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
/* Slot 20 is reserved */
/* Slot 21 is reserved */
-/* Slot 22 is reserved */
+#define TclpCreateTempFile_ \
+ (tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
/* Slot 23 is reserved */
/* Slot 24 is reserved */
/* Slot 25 is reserved */
@@ -519,7 +542,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
(tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
/* Slot 20 is reserved */
/* Slot 21 is reserved */
-/* Slot 22 is reserved */
+#define TclpCreateTempFile_ \
+ (tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
/* Slot 23 is reserved */
/* Slot 24 is reserved */
/* Slot 25 is reserved */
@@ -545,6 +569,15 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#undef TclpInetNtoa
#define TclpInetNtoa inet_ntoa
+#undef TclpCreateTempFile_
+#ifndef MAC_OSX_TCL /* Not accessable on UNIX */
+#undef TclMacOSXGetFileAttribute /* 15 */
+#undef TclMacOSXSetFileAttribute /* 16 */
+#undef TclMacOSXCopyFileAttributes /* 17 */
+#undef TclMacOSXMatchType /* 18 */
+#undef TclMacOSXNotifierAddRunLoopMode /* 19 */
+#endif
+
#if defined(_WIN32)
# undef TclWinNToHS
# undef TclWinGetServByName
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index edf1ba3..4b06148 100644
--- a/generic/tclPlatDecls.h
+++ b/generic/tclPlatDecls.h
@@ -114,6 +114,11 @@ extern const TclPlatStubs *tclPlatStubsPtr;
/* !END!: Do not edit above this line. */
+#ifdef MAC_OSX_TCL /* MACOSX */
+#undef Tcl_MacOSXOpenBundleResources
+#define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e)
+#endif
+
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index fbbac6d..dab8262 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -71,6 +71,7 @@
#undef Tcl_UniCharToUtfDString
#undef Tcl_UtfToUniCharDString
#undef Tcl_UtfToUniChar
+#undef Tcl_MacOSXOpenBundleResources
#if TCL_UTF_MAX > 3
static void uniCodePanic(void) {
@@ -259,6 +260,7 @@ mp_err TclBN_mp_mul_d(const mp_int *a, unsigned int b, mp_int *c) {
# define Tcl_ChannelSeekProc 0
# define Tcl_ChannelCloseProc 0
# define Tcl_Close 0
+# define Tcl_MacOSXOpenBundleResources 0
#else
mp_err TclBN_mp_div_3(const mp_int *a, mp_int *c, unsigned int *d) {
@@ -370,6 +372,15 @@ TclWinGetPlatformId(void)
#endif
#endif /* TCL_NO_DEPRECATED */
+#define TclpCreateTempFile_ TclpCreateTempFile
+#ifndef MAC_OSX_TCL /* On UNIX, fill with other stub entries */
+#define TclMacOSXGetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj **))(void *)TclpCreateProcess
+#define TclMacOSXSetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj *))(void *)isatty
+#define TclMacOSXCopyFileAttributes (int (*)(const char *, const char *, const Tcl_StatBuf *))(void *)TclUnixCopyFile
+#define TclMacOSXMatchType (int (*)(Tcl_Interp *, const char *, const char *, Tcl_StatBuf *, Tcl_GlobTypeData *))(void *)TclpMakeFile
+#define TclMacOSXNotifierAddRunLoopMode (void (*)(const void *))TclpOpenFile
+#endif
+
#ifdef _WIN32
# define TclUnixWaitForFile 0
# define TclUnixCopyFile 0
@@ -999,14 +1010,14 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclpGmtime_unix, /* 12 */
TclpInetNtoa, /* 13 */
TclUnixCopyFile, /* 14 */
- 0, /* 15 */
- 0, /* 16 */
- 0, /* 17 */
- 0, /* 18 */
- 0, /* 19 */
+ TclMacOSXGetFileAttribute, /* 15 */
+ TclMacOSXSetFileAttribute, /* 16 */
+ TclMacOSXCopyFileAttributes, /* 17 */
+ TclMacOSXMatchType, /* 18 */
+ TclMacOSXNotifierAddRunLoopMode, /* 19 */
0, /* 20 */
0, /* 21 */
- 0, /* 22 */
+ TclpCreateTempFile_, /* 22 */
0, /* 23 */
0, /* 24 */
0, /* 25 */
@@ -1072,7 +1083,7 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclMacOSXNotifierAddRunLoopMode, /* 19 */
0, /* 20 */
0, /* 21 */
- 0, /* 22 */
+ TclpCreateTempFile_, /* 22 */
0, /* 23 */
0, /* 24 */
0, /* 25 */
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c
index 01b5de4..af15287 100644
--- a/macosx/tclMacOSXBundle.c
+++ b/macosx/tclMacOSXBundle.c
@@ -163,6 +163,8 @@ OpenResourceMap(
*----------------------------------------------------------------------
*/
+#if !defined(TCL_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9)
+#undef Tcl_MacOSXOpenBundleResources
int
Tcl_MacOSXOpenBundleResources(
Tcl_Interp *interp,
@@ -174,6 +176,7 @@ Tcl_MacOSXOpenBundleResources(
return Tcl_MacOSXOpenVersionedBundleResources(interp, bundleName, NULL,
hasResourceFile, maxPathLen, libraryPath);
}
+#endif
/*
*----------------------------------------------------------------------