Skip to content

Commit 5ca5097

Browse files
author
jan.nijtmans
committed
Update TEA files to the latest version
1 parent e491cca commit 5ca5097

File tree

3 files changed

+42
-67
lines changed

3 files changed

+42
-67
lines changed

configure

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6777,7 +6777,7 @@ printf "%s\n" "$ac_cv_cross" >&6; }
67776777
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
67786778

67796779
TCL_LIB_VERSIONS_OK=nodots
6780-
;;
6780+
;;
67816781
AIX-*)
67826782
if test "$GCC" != "yes"
67836783
then :
@@ -6789,7 +6789,7 @@ then :
67896789
;;
67906790
*)
67916791
# Make sure only first arg gets _r
6792-
CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6792+
CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
67936793
;;
67946794
esac
67956795
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
@@ -7559,46 +7559,6 @@ esac
75597559
fi
75607560
# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
75617561
SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
7562-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
7563-
printf %s "checking if ld accepts -single_module flag... " >&6; }
7564-
if test ${tcl_cv_ld_single_module+y}
7565-
then :
7566-
printf %s "(cached) " >&6
7567-
else case e in #(
7568-
e)
7569-
hold_ldflags=$LDFLAGS
7570-
LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7571-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7572-
/* end confdefs.h. */
7573-
7574-
int
7575-
main (void)
7576-
{
7577-
int i;
7578-
;
7579-
return 0;
7580-
}
7581-
_ACEOF
7582-
if ac_fn_c_try_link "$LINENO"
7583-
then :
7584-
tcl_cv_ld_single_module=yes
7585-
else case e in #(
7586-
e) tcl_cv_ld_single_module=no ;;
7587-
esac
7588-
fi
7589-
rm -f core conftest.err conftest.$ac_objext conftest.beam \
7590-
conftest$ac_exeext conftest.$ac_ext
7591-
LDFLAGS=$hold_ldflags ;;
7592-
esac
7593-
fi
7594-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
7595-
printf "%s\n" "$tcl_cv_ld_single_module" >&6; }
7596-
if test $tcl_cv_ld_single_module = yes
7597-
then :
7598-
7599-
SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7600-
7601-
fi
76027562
# TEA specific: link shlib with current and compatibility version flags
76037563
vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
76047564
SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
@@ -9045,6 +9005,11 @@ rm -rf conftest*
90459005

90469006
printf "%s\n" "#define TCL_MAJOR_VERSION 8" >>confdefs.h
90479007

9008+
fi
9009+
if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tk8}" != x; then
9010+
9011+
printf "%s\n" "#define TK_MAJOR_VERSION 8" >>confdefs.h
9012+
90489013
fi
90499014
if test "${TEA_PLATFORM}" = "windows" ; then
90509015
if test "${SHARED_BUILD}" = "1" ; then

win/nmakehlp.c

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ main(
9090
case 'c':
9191
if (argc != 3) {
9292
chars = snprintf(msg, sizeof(msg) - 1,
93-
"usage: %s -c <compiler option>\n"
93+
"usage: %s -c <compiler option>\n"
9494
"Tests for whether cl.exe supports an option\n"
9595
"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
9696
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
@@ -101,7 +101,7 @@ main(
101101
case 'l':
102102
if (argc < 3) {
103103
chars = snprintf(msg, sizeof(msg) - 1,
104-
"usage: %s -l <linker option> ?<mandatory option> ...?\n"
104+
"usage: %s -l <linker option> ?<mandatory option> ...?\n"
105105
"Tests for whether link.exe supports an option\n"
106106
"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
107107
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
@@ -271,7 +271,7 @@ CheckForCompilerFeature(
271271
if (!ok) {
272272
DWORD err = GetLastError();
273273
int chars = snprintf(msg, sizeof(msg) - 1,
274-
"Tried to launch: \"%s\", but got error [%lu]: ", cmdline, err);
274+
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
275275

276276
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
277277
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
@@ -318,11 +318,11 @@ CheckForCompilerFeature(
318318
*/
319319

320320
return !(strstr(Out.buffer, "D4002") != NULL
321-
|| strstr(Err.buffer, "D4002") != NULL
322-
|| strstr(Out.buffer, "D9002") != NULL
323-
|| strstr(Err.buffer, "D9002") != NULL
324-
|| strstr(Out.buffer, "D2021") != NULL
325-
|| strstr(Err.buffer, "D2021") != NULL);
321+
|| strstr(Err.buffer, "D4002") != NULL
322+
|| strstr(Out.buffer, "D9002") != NULL
323+
|| strstr(Err.buffer, "D9002") != NULL
324+
|| strstr(Out.buffer, "D2021") != NULL
325+
|| strstr(Err.buffer, "D2021") != NULL);
326326
}
327327

328328
static int
@@ -405,7 +405,7 @@ CheckForLinkerFeature(
405405
if (!ok) {
406406
DWORD err = GetLastError();
407407
int chars = snprintf(msg, sizeof(msg) - 1,
408-
"Tried to launch: \"%s\", but got error [%lu]: ", cmdline, err);
408+
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
409409

410410
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
411411
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
@@ -493,9 +493,9 @@ IsIn(
493493

494494
/*
495495
* GetVersionFromFile --
496-
* Looks for a match string in a file and then returns the version
497-
* following the match where a version is anything acceptable to
498-
* package provide or package ifneeded.
496+
* Looks for a match string in a file and then returns the version
497+
* following the match where a version is anything acceptable to
498+
* package provide or package ifneeded.
499499
*/
500500

501501
static const char *
@@ -600,9 +600,9 @@ list_free(list_item_t **listPtrPtr)
600600
*
601601
* Usage is something like:
602602
* nmakehlp -S << $** > $@
603-
* @PACKAGE_NAME@ $(PACKAGE_NAME)
604-
* @PACKAGE_VERSION@ $(PACKAGE_VERSION)
605-
* <<
603+
* @PACKAGE_NAME@ $(PACKAGE_NAME)
604+
* @PACKAGE_VERSION@ $(PACKAGE_VERSION)
605+
* <<
606606
*/
607607

608608
static int
@@ -747,8 +747,9 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
747747
#else
748748
hSearch = FindFirstFile(path, &finfo);
749749
#endif
750-
if (hSearch == INVALID_HANDLE_VALUE)
750+
if (hSearch == INVALID_HANDLE_VALUE) {
751751
return 1; /* Not found */
752+
}
752753

753754
/* Loop through all subdirs checking if the keypath is under there */
754755
ret = 1; /* Assume not found */
@@ -758,11 +759,13 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
758759
* We need to check it is a directory despite the
759760
* FindExSearchLimitToDirectories in the above call. See SDK docs
760761
*/
761-
if ((finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
762+
if ((finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
762763
continue;
764+
}
763765
sublen = strlen(finfo.cFileName);
764-
if ((dirlen+1+sublen+1+keylen+1) > sizeof(path))
766+
if ((dirlen+1+sublen+1+keylen+1) > sizeof(path)) {
765767
continue; /* Path does not fit, assume not matched */
768+
}
766769
strncpy(path+dirlen+1, finfo.cFileName, sublen);
767770
path[dirlen+1+sublen] = '\\';
768771
strncpy(path+dirlen+1+sublen+1, keypath, keylen+1);
@@ -782,13 +785,13 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
782785
* LocateDependency --
783786
*
784787
* Locates a dependency for a package.
785-
* keypath - a relative path within the package directory
786-
* that is used to confirm it is the correct directory.
788+
* keypath - a relative path within the package directory
789+
* that is used to confirm it is the correct directory.
787790
* The search path for the package directory is currently only
788-
* the parent and grandparent of the current working directory.
789-
* If found, the command prints
790-
* name_DIRPATH=<full path of located directory>
791-
* and returns 0. If not found, does not print anything and returns 1.
791+
* the parent and grandparent of the current working directory.
792+
* If found, the command prints
793+
* name_DIRPATH=<full path of located directory>
794+
* and returns 0. If not found, does not print anything and returns 1.
792795
*/
793796
static int LocateDependency(const char *keypath)
794797
{

win/rules.vc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _RULES_VC = 1
2424
# For modifications that are not backward-compatible, you *must* change
2525
# the major version.
2626
RULES_VERSION_MAJOR = 1
27-
RULES_VERSION_MINOR = 12
27+
RULES_VERSION_MINOR = 13
2828

2929
# The PROJECT macro must be defined by parent makefile.
3030
!if "$(PROJECT)" == ""
@@ -881,6 +881,10 @@ USE_THREAD_ALLOC= 0
881881
!message *** Build for Tcl8
882882
TCL_BUILD_FOR = 8
883883
!endif
884+
!if [nmakehlp -f $(OPTS) "tk8"]
885+
!message *** Build for Tk8
886+
TK_BUILD_FOR = 8
887+
!endif
884888

885889
!if $(TCL_MAJOR_VERSION) == 8
886890
!if [nmakehlp -f $(OPTS) "time64bit"]
@@ -1451,6 +1455,9 @@ OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1
14511455
!if "$(TCL_BUILD_FOR)" == "8"
14521456
OPTDEFINES = $(OPTDEFINES) /DTCL_MAJOR_VERSION=8
14531457
!endif
1458+
!if "$(TK_BUILD_FOR)" == "8"
1459+
OPTDEFINES = $(OPTDEFINES) /DTK_MAJOR_VERSION=8
1460+
!endif
14541461

14551462
# Like the TEA system only set this non empty for non-Tk extensions
14561463
# Note: some extensions use PACKAGE_NAME and others use PACKAGE_TCLNAME

0 commit comments

Comments
 (0)