diff options
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/Makefile.in | 44 | ||||
| -rwxr-xr-x | unix/configure | 14 | ||||
| -rw-r--r-- | unix/tcl.m4 | 12 | ||||
| -rw-r--r-- | unix/tclEpollNotfy.c | 1 | ||||
| -rw-r--r-- | unix/tclLoadAix.c | 4 | ||||
| -rw-r--r-- | unix/tclUnixFCmd.c | 8 | ||||
| -rw-r--r-- | unix/tclUnixPipe.c | 6 | ||||
| -rw-r--r-- | unix/tclUnixPort.h | 6 | ||||
| -rw-r--r-- | unix/tclUnixTest.c | 4 |
9 files changed, 57 insertions, 42 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 4dea6c1..d769f03 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -337,6 +337,7 @@ TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ bn_mp_read_radix.o bn_mp_rshd.o bn_mp_set.o bn_mp_set_int.o \ bn_mp_set_long.o bn_mp_set_long_long.o bn_mp_shrink.o \ bn_mp_sqr.o bn_mp_sqrt.o bn_mp_sub.o bn_mp_sub_d.o \ + bn_mp_tc_and.o bn_mp_tc_div_2d.o bn_mp_tc_or.o bn_mp_tc_xor.o \ bn_mp_to_unsigned_bin.o bn_mp_to_unsigned_bin_n.o \ bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_toradix_n.o \ bn_mp_unsigned_bin_size.o bn_mp_xor.o bn_mp_zero.o bn_s_mp_add.o \ @@ -547,6 +548,10 @@ TOMMATH_SRCS = \ $(TOMMATH_DIR)/bn_mp_sqrt.c \ $(TOMMATH_DIR)/bn_mp_sub.c \ $(TOMMATH_DIR)/bn_mp_sub_d.c \ + $(TOMMATH_DIR)/bn_mp_tc_and.c \ + $(TOMMATH_DIR)/bn_mp_tc_div_2d.c \ + $(TOMMATH_DIR)/bn_mp_tc_or.c \ + $(TOMMATH_DIR)/bn_mp_tc_xor.c \ $(TOMMATH_DIR)/bn_mp_to_unsigned_bin.c \ $(TOMMATH_DIR)/bn_mp_to_unsigned_bin_n.c \ $(TOMMATH_DIR)/bn_mp_toom_mul.c \ @@ -680,19 +685,32 @@ tclzipfile: ${TCL_ZIP_FILE} ${TCL_ZIP_FILE}: ${ZIP_INSTALL_OBJS} @rm -rf ${TCL_VFS_ROOT} @mkdir -p ${TCL_VFS_PATH} - cp -a $(TOP_DIR)/library/* ${TCL_VFS_PATH} - -find ${TCL_VFS_ROOT} -type d -empty -delete - ( cd ${TCL_VFS_ROOT} ; ${NATIVE_ZIP} ${ZIP_PROG_OPTIONS} ../${TCL_ZIP_FILE} ${ZIP_PROG_VFSSEARCH}) + @echo "creating ${TCL_VFS_PATH} (prepare compression)" + @( \ + ln -s $(TOP_DIR)/library/* ${TCL_VFS_PATH}/ && \ + ln ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl \ + ) || ( \ + cp -a $(TOP_DIR)/library/* ${TCL_VFS_PATH}; \ + cp -a ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl; \ + ) + @find ${TCL_VFS_ROOT} -type d -empty -delete + (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \ + (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \ + cd ${TCL_VFS_ROOT} && \ + $$zip ${ZIP_PROG_OPTIONS} ../${TCL_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null && \ + echo "${TCL_ZIP_FILE} successful created with $$zip" && \ + cd ..) # The following target is configured by autoconf to generate either a shared # library or non-shared library for Tcl. ${LIB_FILE}: ${STUB_LIB_FILE} ${OBJS} ${TCL_ZIP_FILE} rm -f $@ @MAKE_LIB@ -ifeq (${ZIPFS_BUILD},1) - cat ${TCL_ZIP_FILE} >> ${LIB_FILE} - ${NATIVE_ZIP} -A ${LIB_FILE} -endif + @if test "${ZIPFS_BUILD}" = "1" ; then \ + cat ${TCL_ZIP_FILE} >> ${LIB_FILE}; \ + ${NATIVE_ZIP} -A ${LIB_FILE} \ + || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ + fi ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} @if [ "x${LIB_FILE}" = "xlibtcl${MAJOR_VERSION}.${MINOR_VERSION}.dll" ] ; then \ @@ -1616,6 +1634,18 @@ bn_mp_sub.o: $(TOMMATH_DIR)/bn_mp_sub.c $(MATHHDRS) bn_mp_sub_d.o: $(TOMMATH_DIR)/bn_mp_sub_d.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_sub_d.c +bn_mp_tc_and.o: $(TOMMATH_DIR)/bn_mp_tc_and.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_tc_and.c + +bn_mp_tc_div_2d.o: $(TOMMATH_DIR)/bn_mp_tc_div_2d.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_tc_div_2d.c + +bn_mp_tc_or.o: $(TOMMATH_DIR)/bn_mp_tc_or.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_tc_or.c + +bn_mp_tc_xor.o: $(TOMMATH_DIR)/bn_mp_tc_xor.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_tc_xor.c + bn_mp_to_unsigned_bin.o: $(TOMMATH_DIR)/bn_mp_to_unsigned_bin.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_to_unsigned_bin.c diff --git a/unix/configure b/unix/configure index d963fbe..ea26c4f 100755 --- a/unix/configure +++ b/unix/configure @@ -5902,12 +5902,6 @@ fi SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - # Don't use -prebind when building for Mac OS X 10.4 or later only: - if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : - - LDFLAGS="$LDFLAGS -prebind" -fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } @@ -10098,20 +10092,20 @@ else fi if test -f "$ac_cv_path_zip" ; then - ZIP_PROG="$ac_cv_path_zip " + ZIP_PROG="$ac_cv_path_zip" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5 $as_echo "$ZIP_PROG" >&6; } ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="." + ZIP_PROG_VFSSEARCH="*" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5 $as_echo "Found INFO Zip in environment" >&6; } # Use standard arguments for zip else # It is not an error if an installed version of Zip can't be located. # We can use the locally distributed minizip instead - ZIP_PROG="../minizip${EXEEXT_FOR_BUILD}" + ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="." + ZIP_PROG_VFSSEARCH="*" ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH. Building minizip" >&5 $as_echo "No zip found on PATH. Building minizip" >&6; } diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6955ace..a206f26 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1459,10 +1459,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - # Don't use -prebind when building for Mac OS X 10.4 or later only: - AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [ - LDFLAGS="$LDFLAGS -prebind"]) LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ @@ -3011,18 +3007,18 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [ done ]) if test -f "$ac_cv_path_zip" ; then - ZIP_PROG="$ac_cv_path_zip " + ZIP_PROG="$ac_cv_path_zip" AC_MSG_RESULT([$ZIP_PROG]) ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="." + ZIP_PROG_VFSSEARCH="*" AC_MSG_RESULT([Found INFO Zip in environment]) # Use standard arguments for zip else # It is not an error if an installed version of Zip can't be located. # We can use the locally distributed minizip instead - ZIP_PROG="../minizip${EXEEXT_FOR_BUILD}" + ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="." + ZIP_PROG_VFSSEARCH="*" ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" AC_MSG_RESULT([No zip found on PATH. Building minizip]) fi diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 7a5e09d..4961ef5 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -24,7 +24,6 @@ #include <sys/eventfd.h> #endif /* HAVE_EVENTFD */ #include <sys/queue.h> -#include <unistd.h> /* * This structure is used to keep track of the notifier info for a registered diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c index 88e6b50..e5d9729 100644 --- a/unix/tclLoadAix.c +++ b/unix/tclLoadAix.c @@ -134,7 +134,7 @@ dlopen( return NULL; } - mp->name = malloc((unsigned) (strlen(path) + 1)); + mp->name = malloc(strlen(path) + 1); strcpy(mp->name, path); /* @@ -541,7 +541,7 @@ readExports( tmpsym[SYMNMLEN] = '\0'; symname = tmpsym; } - ep->name = malloc((unsigned) (strlen(symname) + 1)); + ep->name = malloc(strlen(symname) + 1); strcpy(ep->name, symname); ep->addr = (void *)((unsigned long) mp->entry + ls->l_value - shdata.s_vaddr); diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 548e96b..7205085 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -1369,7 +1369,7 @@ GetGroupAttribute( groupPtr = TclpGetGrGid(statBuf.st_gid); if (groupPtr == NULL) { - *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_gid); + *attributePtrPtr = Tcl_NewWideIntObj(statBuf.st_gid); } else { Tcl_DString ds; const char *utf; @@ -1423,7 +1423,7 @@ GetOwnerAttribute( pwPtr = TclpGetPwUid(statBuf.st_uid); if (pwPtr == NULL) { - *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_uid); + *attributePtrPtr = Tcl_NewWideIntObj(statBuf.st_uid); } else { Tcl_DString ds; @@ -2340,8 +2340,8 @@ GetUnixFileAttributes( return TCL_ERROR; } - *attributePtrPtr = Tcl_NewIntObj( - (fileAttributes & attributeArray[objIndex]) != 0); + *attributePtrPtr = Tcl_NewBooleanObj( + fileAttributes & attributeArray[objIndex]); return TCL_OK; } diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index be7b4eb..93faec8 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -872,7 +872,7 @@ TclGetAndDetachPids( pipePtr = Tcl_GetChannelInstanceData(chan); TclNewObj(pidsObj); for (i = 0; i < pipePtr->numPids; i++) { - Tcl_ListObjAppendElement(NULL, pidsObj, Tcl_NewIntObj( + Tcl_ListObjAppendElement(NULL, pidsObj, Tcl_NewWideIntObj( PTR2INT(pipePtr->pidPtr[i]))); Tcl_DetachPids(1, &pipePtr->pidPtr[i]); } @@ -1268,7 +1268,7 @@ Tcl_PidObjCmd( } if (objc == 1) { - Tcl_SetObjResult(interp, Tcl_NewLongObj((long) getpid())); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(getpid())); } else { /* * Get the channel and make sure that it refers to a pipe. @@ -1290,7 +1290,7 @@ Tcl_PidObjCmd( resultPtr = Tcl_NewObj(); for (i = 0; i < pipePtr->numPids; i++) { Tcl_ListObjAppendElement(NULL, resultPtr, - Tcl_NewIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i])))); + Tcl_NewWideIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i])))); } Tcl_SetObjResult(interp, resultPtr); } diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 57853c4..c982585 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -156,11 +156,7 @@ typedef off_t Tcl_SeekOffset; #ifdef HAVE_STDINT_H # include <stdint.h> #endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#else -# include "../compat/unistd.h" -#endif +#include <unistd.h> MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode); diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index ceb64d9..e59a0e3 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -570,7 +570,7 @@ TestforkObjCmd( if (pid==0) { Tcl_InitNotifier(); } - Tcl_SetObjResult(interp, Tcl_NewIntObj(pid)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(pid)); return TCL_OK; } @@ -761,7 +761,7 @@ TestchmodCmd( if (translated == NULL) { return TCL_ERROR; } - if (chmod(translated, (unsigned) mode) != 0) { + if (chmod(translated, mode) != 0) { Tcl_AppendResult(interp, translated, ": ", Tcl_PosixError(interp), NULL); return TCL_ERROR; |
