summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--generic/tclCompile.c3
-rw-r--r--generic/tclIOSock.c4
-rw-r--r--generic/tclInt.h5
-rwxr-xr-xunix/configure2
-rw-r--r--unix/tcl.m42
-rw-r--r--unix/tclUnixNotfy.c12
-rw-r--r--unix/tclUnixSock.c5
-rw-r--r--unix/tclXtNotify.c26
-rw-r--r--win/tclWinSock.c5
10 files changed, 45 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index edc8a40..2da02a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-07-03 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * unix/tclXtNotify.c: Bug [817249]: bring tclXtNotify.c up to date with
+ Tcl_SetNotifier() change.
+
+2013-07-02 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * unix/tcl.m4: Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4
+ * unix/configure: (thanks to Brian Griffin)
+
2013-06-27 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclConfig.c: Bug [9b2e636361]: Tcl_CreateInterp() needs initialized
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 05daabf..5aab69c 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1773,11 +1773,12 @@ CompileCommandTokens(
}
}
- /* Do we know the command word? */
+ /* Do we know the command word? */
Tcl_IncrRefCount(cmdObj);
tokenPtr = parsePtr->tokenPtr;
cmdKnown = TclWordKnownAtCompileTime(tokenPtr, cmdObj);
+ /* Is this a command we should (try to) compile with a compileProc ? */
if (cmdKnown && !(iPtr->flags & DONT_COMPILE_CMDS_INLINE)) {
cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, cmdObj);
if (cmdPtr) {
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 694501f..7d6c462 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -139,7 +139,7 @@ int
TclCreateSocketAddress(
Tcl_Interp *interp, /* Interpreter for querying
* the desired socket family */
- struct addrinfo **addrlist, /* Socket address list */
+ void **addrlist, /* Socket address list */
const char *host, /* Host. NULL implies INADDR_ANY */
int port, /* Port number */
int willBind, /* Is this an address to bind() to or
@@ -213,7 +213,7 @@ TclCreateSocketAddress(
hints.ai_flags |= AI_PASSIVE;
}
- result = getaddrinfo(native, portstring, &hints, addrlist);
+ result = getaddrinfo(native, portstring, &hints, (struct addrinfo **) addrlist);
if (host != NULL) {
Tcl_DStringFree(&ds);
diff --git a/generic/tclInt.h b/generic/tclInt.h
index fdd577a..b940225 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3010,9 +3010,8 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
MODULE_SCOPE void TclpFinalizePipes(void);
MODULE_SCOPE void TclpFinalizeSockets(void);
MODULE_SCOPE int TclCreateSocketAddress(Tcl_Interp *interp,
- struct addrinfo **addrlist,
- const char *host, int port, int willBind,
- const char **errorMsgPtr);
+ void **addrlist, const char *host, int port,
+ int willBind, const char **errorMsgPtr);
MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
Tcl_ThreadCreateProc *proc, ClientData clientData,
int stackSize, int flags);
diff --git a/unix/configure b/unix/configure
index 7626343..d37aa4f 100755
--- a/unix/configure
+++ b/unix/configure
@@ -9788,7 +9788,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/dirent.h>
+#include <dirent.h>
int
main ()
{
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 43e2b78..b69d5a6 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2640,7 +2640,7 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
# Now check for auxiliary declarations
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/dirent.h>],[struct dirent64 p;],
+#include <dirent.h>],[struct dirent64 p;],
tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index b87af1b..aacc8d2d 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -96,7 +96,7 @@ typedef struct ThreadSpecificData {
* that an event is ready to be processed
* by sending this event. */
void *hwnd; /* Messaging window. */
-#else
+#else /* !__CYGWIN__ */
Tcl_Condition waitCV; /* Any other thread alerts a notifier that an
* event is ready to be processed by signaling
* this condition variable. */
@@ -184,9 +184,9 @@ static Tcl_ThreadId notifierThread;
*/
#ifdef TCL_THREADS
-static void NotifierThreadProc(ClientData clientData);
+static void NotifierThreadProc(ClientData clientData);
#endif
-static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
+static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
/*
* Import of Windows API when building threaded with Cygwin.
@@ -213,14 +213,14 @@ typedef struct {
void *hCursor;
void *hbrBackground;
void *lpszMenuName;
- void *lpszClassName;
+ const void *lpszClassName;
} WNDCLASS;
extern void __stdcall CloseHandle(void *);
extern void *__stdcall CreateEventW(void *, unsigned char, unsigned char,
void *);
-extern void * __stdcall CreateWindowExW(void *, void *, void *, DWORD, int,
- int, int, int, void *, void *, void *, void *);
+extern void * __stdcall CreateWindowExW(void *, const void *, const void *,
+ DWORD, int, int, int, int, void *, void *, void *, void *);
extern DWORD __stdcall DefWindowProcW(void *, int, void *, void *);
extern unsigned char __stdcall DestroyWindow(void *);
extern int __stdcall DispatchMessageW(const MSG *);
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 528f009..9c3d7eb 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1131,7 +1131,7 @@ Tcl_OpenTcpClient(
{
TcpState *state;
const char *errorMsg = NULL;
- struct addrinfo *addrlist = NULL, *myaddrlist = NULL;
+ void *addrlist = NULL, *myaddrlist = NULL;
char channelName[SOCK_CHAN_LENGTH];
/*
@@ -1276,7 +1276,8 @@ Tcl_OpenTcpServer(
ClientData acceptProcData) /* Data for the callback. */
{
int status = 0, sock = -1, reuseaddr = 1, chosenport = 0;
- struct addrinfo *addrlist = NULL, *addrPtr; /* socket address */
+ void *addrlist = NULL;
+ struct addrinfo *addrPtr; /* socket address */
TcpState *statePtr = NULL;
char channelName[SOCK_CHAN_LENGTH];
const char *errorMsg = NULL;
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c
index e289e8c..a5d92d6 100644
--- a/unix/tclXtNotify.c
+++ b/unix/tclXtNotify.c
@@ -77,10 +77,10 @@ static int initialized = 0;
*/
static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
-static void FileProc(ClientData clientData, int *source,
+static void FileProc(XtPointer clientData, int *source,
XtInputId *id);
static void NotifierExitHandler(ClientData clientData);
-static void TimerProc(ClientData clientData, XtIntervalId *id);
+static void TimerProc(XtPointer clientData, XtIntervalId *id);
static void CreateFileHandler(int fd, int mask,
Tcl_FileProc *proc, ClientData clientData);
static void DeleteFileHandler(int fd);
@@ -181,7 +181,7 @@ TclSetAppContext(
void
InitNotifier(void)
{
- Tcl_NotifierProcs notifier;
+ Tcl_NotifierProcs np;
/*
* Only reinitialize if we are not in exit handling. The notifier can get
@@ -193,11 +193,15 @@ InitNotifier(void)
return;
}
- notifier.createFileHandlerProc = CreateFileHandler;
- notifier.deleteFileHandlerProc = DeleteFileHandler;
- notifier.setTimerProc = SetTimer;
- notifier.waitForEventProc = WaitForEvent;
- Tcl_SetNotifier(&notifier);
+ np.createFileHandlerProc = CreateFileHandler;
+ np.deleteFileHandlerProc = DeleteFileHandler;
+ np.setTimerProc = SetTimer;
+ np.waitForEventProc = WaitForEvent;
+ np.initNotifierProc = Tcl_InitNotifier;
+ np.finalizeNotifierProc = Tcl_FinalizeNotifier;
+ np.alertNotifierProc = Tcl_AlertNotifier;
+ np.serviceModeHookProc = Tcl_ServiceModeHook;
+ Tcl_SetNotifier(&np);
/*
* DO NOT create the application context yet; doing so would prevent
@@ -205,7 +209,7 @@ InitNotifier(void)
*/
initialized = 1;
- memset(&notifier, 0, sizeof(notifier));
+ memset(&np, 0, sizeof(np));
Tcl_CreateExitHandler(NotifierExitHandler, NULL);
}
@@ -301,7 +305,7 @@ SetTimer(
static void
TimerProc(
- ClientData clientData, /* Not used. */
+ XtPointer clientData, /* Not used. */
XtIntervalId *id)
{
if (*id != notifier.currentTimeout) {
@@ -488,7 +492,7 @@ DeleteFileHandler(
static void
FileProc(
- ClientData clientData,
+ XtPointer clientData,
int *fd,
XtInputId *id)
{
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 4ced0e7..f4d5a90 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1131,9 +1131,10 @@ CreateSocket(
int asyncConnect = 0; /* Will be 1 if async connect is in
* progress. */
unsigned short chosenport = 0;
- struct addrinfo *addrlist = NULL, *addrPtr;
+ void *addrlist = NULL, *myaddrlist = NULL;
+ struct addrinfo *addrPtr;
/* Socket address to connect to. */
- struct addrinfo *myaddrlist = NULL, *myaddrPtr;
+ struct addrinfo *myaddrPtr;
/* Socket address for our side. */
const char *errorMsg = NULL;
SOCKET sock = INVALID_SOCKET;