summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-12-04 20:31:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-12-04 20:31:44 (GMT)
commit93b8f2c30656668655ffad72004b3a56525f0ab7 (patch)
treeaf50bcec85c53b3240e016810f9b6d82a643822a /unix/tclUnixInit.c
parent1d7743062b46a9021442e694fb0ce567267a9bb6 (diff)
parent6e413c43c808774a91f542de590fb533b0fdd1c7 (diff)
downloadtcl-93b8f2c30656668655ffad72004b3a56525f0ab7.zip
tcl-93b8f2c30656668655ffad72004b3a56525f0ab7.tar.gz
tcl-93b8f2c30656668655ffad72004b3a56525f0ab7.tar.bz2
Remove a lot of dead code: macOS < 10.9 is no longer supported
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 9f19075..f276e71 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -11,13 +11,6 @@
#include "tclInt.h"
#ifdef HAVE_LANGINFO
# include <langinfo.h>
-# ifdef __APPLE__
-# if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1030
- /* Support for weakly importing nl_langinfo on Darwin. */
-# define WEAK_IMPORT_NL_LANGINFO
- extern char *nl_langinfo(nl_item) WEAK_IMPORT_ATTRIBUTE;
-# endif
-# endif
#endif
#include <sys/resource.h>
#if defined(__FreeBSD__) && defined(__GNUC__)
@@ -321,20 +314,6 @@ static const LocaleTable localeTable[] = {
static int MacOSXGetLibraryPath(Tcl_Interp *interp,
int maxPathLen, char *tclLibPath);
#endif /* HAVE_COREFOUNDATION */
-#if defined(__APPLE__) && (defined(TCL_LOAD_FROM_MEMORY) || ( \
- defined(MAC_OS_X_VERSION_MIN_REQUIRED) && ( \
- (TCL_THREADS && MAC_OS_X_VERSION_MIN_REQUIRED < 1030) || \
- (defined(__LP64__) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050) || \
- (defined(HAVE_COREFOUNDATION) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050)\
- )))
-/*
- * Need to check Darwin release at runtime in tclUnixFCmd.c and tclLoadDyld.c:
- * initialize release global at startup from uname().
- */
-#define GET_DARWIN_RELEASE 1
-MODULE_SCOPE long tclMacOSXDarwinRelease;
-long tclMacOSXDarwinRelease = 0;
-#endif
/*
*---------------------------------------------------------------------------
@@ -422,16 +401,6 @@ TclpInitPlatform(void)
*/
setlocale(LC_NUMERIC, "C");
-
-#ifdef GET_DARWIN_RELEASE
- {
- struct utsname name;
-
- if (!uname(&name)) {
- tclMacOSXDarwinRelease = strtol(name.release, NULL, 10);
- }
- }
-#endif
}
/*
@@ -743,7 +712,7 @@ Tcl_GetEncodingNameFromEnvironment(
*----------------------------------------------------------------------
*/
-#if defined(HAVE_COREFOUNDATION) && MAC_OS_X_VERSION_MAX_ALLOWED > 1020
+#if defined(HAVE_COREFOUNDATION)
/*
* Helper because whether CFLocaleCopyCurrent and CFLocaleGetIdentifier are
* strongly or weakly bound varies by version of OSX, triggering warnings.
@@ -778,7 +747,7 @@ InitMacLocaleInfoVar(
}
CFRelease(localeRef);
}
-#endif /*defined(HAVE_COREFOUNDATION) && MAC_OS_X_VERSION_MAX_ALLOWED > 1020*/
+#endif /*defined(HAVE_COREFOUNDATION)*/
void
TclpSetVariables(
@@ -803,9 +772,7 @@ TclpSetVariables(
* Set msgcat fallback locale to current CFLocale identifier.
*/
-#if MAC_OS_X_VERSION_MAX_ALLOWED > 1020
InitMacLocaleInfoVar(CFLocaleCopyCurrent, CFLocaleGetIdentifier, interp);
-#endif /* MAC_OS_X_VERSION_MAX_ALLOWED > 1020 */
if (MacOSXGetLibraryPath(interp, MAXPATHLEN, tclLibPath) == TCL_OK) {
const char *str;