diff options
author | nijtmans <nijtmans> | 2010-06-14 12:58:11 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-06-14 12:58:11 (GMT) |
commit | ca1cacf50dec50820fccecc8e3dc43820e6f4f63 (patch) | |
tree | aab909940ea4d91fc0b6f8ca778f93996411e4c2 /unix | |
parent | b76b06298684d10212e10d970bb2d5ee1ff29b45 (diff) | |
download | tcl-ca1cacf50dec50820fccecc8e3dc43820e6f4f63.zip tcl-ca1cacf50dec50820fccecc8e3dc43820e6f4f63.tar.gz tcl-ca1cacf50dec50820fccecc8e3dc43820e6f4f63.tar.bz2 |
Fix compilation of xttest with 8.6 changes
tclPipe.c: Fix gcc warning (with -fstrict-aliasing=2)
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 15 | ||||
-rw-r--r-- | unix/tclXtNotify.c | 31 | ||||
-rw-r--r-- | unix/tclXtTest.c | 16 |
3 files changed, 30 insertions, 32 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 1360908..46633b5 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.300 2010/06/09 20:11:34 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.301 2010/06/14 12:58:12 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -625,7 +625,8 @@ tclLibObjs: objs: ${OBJS} ${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o ${TCL_EXE} # Must be empty so it doesn't conflict with rule for ${TCL_EXE} above @@ -677,7 +678,8 @@ ${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLT $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" tcltest-real: - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ ${CC_SEARCH_FLAGS} -o ${TCLTEST_EXE} # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" @@ -1543,10 +1545,9 @@ $(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) # notifier can modify them to suit their own installation. #-------------------------------------------------------------------------- -xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ - @DL_OBJS@ ${BUILD_DLTEST} - ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ - @DL_OBJS@ @TCL_BUILD_LIB_SPEC@ ${LIBS} \ +xttest: ${XTTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} + ${CC} ${CFLAGS} ${LDFLAGS} ${XTTEST_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -L/usr/openwin/lib -lXt -o xttest tclXtNotify.o: $(UNIX_DIR)/tclXtNotify.c diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index c8c553d..ab82c58 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtNotify.c,v 1.11 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclXtNotify.c,v 1.12 2010/06/14 12:58:12 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -18,6 +18,9 @@ #include <X11/Intrinsic.h> #include "tclInt.h" +#ifndef CONST86 +# define CONST86 +#endif /* * This structure is used to keep track of the notifier info for a a * registered file. @@ -79,22 +82,22 @@ static int initialized = 0; */ static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); -static void FileProc(caddr_t clientData, int *source, +static void FileProc(ClientData clientData, int *source, XtInputId *id); -void InitNotifier(void); static void NotifierExitHandler(ClientData clientData); -static void TimerProc(caddr_t clientData, XtIntervalId *id); +static void TimerProc(ClientData clientData, XtIntervalId *id); static void CreateFileHandler(int fd, int mask, Tcl_FileProc * proc, ClientData clientData); static void DeleteFileHandler(int fd); -static void SetTimer(Tcl_Time * timePtr); -static int WaitForEvent(Tcl_Time * timePtr); +static void SetTimer(CONST86 Tcl_Time * timePtr); +static int WaitForEvent(CONST86 Tcl_Time * timePtr); /* * Functions defined in this file for use by users of the Xt Notifier: */ -EXTERN XtAppContext TclSetAppContext(XtAppContext ctx); +MODULE_SCOPE void InitNotifier(void); +MODULE_SCOPE XtAppContext TclSetAppContext(XtAppContext ctx); /* *---------------------------------------------------------------------- @@ -264,7 +267,7 @@ NotifierExitHandler( static void SetTimer( - Tcl_Time *timePtr) /* Timeout value, may be NULL. */ + CONST86 Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { long timeout; @@ -303,7 +306,7 @@ SetTimer( static void TimerProc( - caddr_t data, /* Not used. */ + ClientData clientData, /* Not used. */ XtIntervalId *id) { if (*id != notifier.currentTimeout) { @@ -377,7 +380,7 @@ CreateFileHandler( if (mask & TCL_READABLE) { if (!(filePtr->mask & TCL_READABLE)) { filePtr->read = XtAppAddInput(notifier.appContext, fd, - XtInputReadMask, FileProc, filePtr); + INT2PTR(XtInputReadMask), FileProc, filePtr); } } else { if (filePtr->mask & TCL_READABLE) { @@ -387,7 +390,7 @@ CreateFileHandler( if (mask & TCL_WRITABLE) { if (!(filePtr->mask & TCL_WRITABLE)) { filePtr->write = XtAppAddInput(notifier.appContext, fd, - XtInputWriteMask, FileProc, filePtr); + INT2PTR(XtInputWriteMask), FileProc, filePtr); } } else { if (filePtr->mask & TCL_WRITABLE) { @@ -397,7 +400,7 @@ CreateFileHandler( if (mask & TCL_EXCEPTION) { if (!(filePtr->mask & TCL_EXCEPTION)) { filePtr->except = XtAppAddInput(notifier.appContext, fd, - XtInputExceptMask, FileProc, filePtr); + INT2PTR(XtInputExceptMask), FileProc, filePtr); } } else { if (filePtr->mask & TCL_EXCEPTION) { @@ -490,7 +493,7 @@ DeleteFileHandler( static void FileProc( - caddr_t clientData, + ClientData clientData, int *fd, XtInputId *id) { @@ -628,7 +631,7 @@ FileHandlerEventProc( static int WaitForEvent( - Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + CONST86 Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { int timeout; diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index d4bef9e..54bcbcf 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.10 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.11 2010/06/14 12:58:11 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -19,19 +19,13 @@ static int TesteventloopCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv); -extern void InitNotifier(void); - +extern DLLEXPORT Tcl_PackageInitProc Tclxttest_Init; /* - * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the - * Tcltest_Init declaration is in the source file itself, which is only - * accessed when we are building a library. + * Functions defined in tclXtNotify.c for use by users of the Xt Notifier: */ -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT -EXTERN int Tclxttest_Init(Tcl_Interp *interp); - - +extern void InitNotifier(void); +extern XtAppContext TclSetAppContext(XtAppContext ctx); /* *---------------------------------------------------------------------- |