diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-19 18:28:03 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-19 18:28:03 (GMT) |
commit | 85545145a0037e04583982f27e58ce2137783f62 (patch) | |
tree | c7c71e684b6fe6032420fb24b0df1bcc10fdae16 | |
parent | 729687600b66c16b05f8b800209bf0252c285bac (diff) | |
parent | 0218abe5f52843f501c1735ffeadef3d5e9d24bd (diff) | |
download | tcl-85545145a0037e04583982f27e58ce2137783f62.zip tcl-85545145a0037e04583982f27e58ce2137783f62.tar.gz tcl-85545145a0037e04583982f27e58ce2137783f62.tar.bz2 |
merge trunk
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | compat/float.h | 14 | ||||
-rw-r--r-- | generic/tcl.h | 2 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 1 | ||||
-rw-r--r-- | generic/tclEncoding.c | 1 | ||||
-rw-r--r-- | generic/tclFCmd.c | 1 | ||||
-rw-r--r-- | generic/tclFileName.c | 1 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 1 | ||||
-rw-r--r-- | generic/tclPort.h | 5 | ||||
-rw-r--r-- | generic/tclTest.c | 1 | ||||
-rw-r--r-- | macosx/tclMacOSXFCmd.c | 1 | ||||
-rw-r--r-- | unix/tclUnixCompat.c | 2 | ||||
-rw-r--r-- | unix/tclUnixFCmd.c | 5 | ||||
-rw-r--r-- | unix/tclUnixFile.c | 7 | ||||
-rw-r--r-- | unix/tclUnixInit.c | 1 | ||||
-rw-r--r-- | unix/tclUnixPort.h | 44 | ||||
-rw-r--r-- | win/tclWinConsole.c | 1 | ||||
-rw-r--r-- | win/tclWinFile.c | 1 | ||||
-rw-r--r-- | win/tclWinPipe.c | 2 | ||||
-rw-r--r-- | win/tclWinSerial.c | 2 | ||||
-rw-r--r-- | win/tclWinThrd.c | 3 |
21 files changed, 33 insertions, 68 deletions
@@ -1,3 +1,8 @@ +2013-01-18 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tclPort.h: [Bug 3598300]: unix: tcl.h does not include + sys/stat.h + 2013-01-17 Donal K. Fellows <dkf@users.sf.net> * generic/tclCompCmds.c (PushVarName): [Bug 3600328]: Added mechanism diff --git a/compat/float.h b/compat/float.h deleted file mode 100644 index 411edbf..0000000 --- a/compat/float.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * float.h -- - * - * This is a dummy header file to #include in Tcl when there - * is no float.h in /usr/include. Right now this file is empty: - * Tcl contains #ifdefs to deal with the lack of definitions; - * all it needs is for the #include statement to work. - * - * Copyright (c) 1993 The Regents of the University of California. - * Copyright (c) 1994 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - */ diff --git a/generic/tcl.h b/generic/tcl.h index 5ae5f5d..7bab11b 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -349,7 +349,7 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt; struct {long tv_sec;} st_ctim; /* Here is a 4-byte gap */ } Tcl_StatBuf; -#elif defined(HAVE_STRUCT_STAT64) +#elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__) typedef struct stat64 Tcl_StatBuf; #else typedef struct stat Tcl_StatBuf; diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 8468356..fefe5a3 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -11,7 +11,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #include <locale.h> diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index cf57c92..757f771 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -9,7 +9,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" typedef size_t (LengthProc)(const char *src); diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index adf60d9..33c1496 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -10,7 +10,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #include "tclFileSystem.h" diff --git a/generic/tclFileName.c b/generic/tclFileName.c index f362239..a519f0e 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -11,7 +11,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #include "tclRegexp.h" #include "tclFileSystem.h" /* For TclGetPathType() */ diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 16eac38..e0043f5 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -18,7 +18,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #ifdef __WIN32__ # include "tclWinInt.h" diff --git a/generic/tclPort.h b/generic/tclPort.h index 7021b8d..12a60db 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.h @@ -19,11 +19,10 @@ #endif #if defined(_WIN32) # include "tclWinPort.h" -#endif -#include "tcl.h" -#if !defined(_WIN32) +#else # include "tclUnixPort.h" #endif +#include "tcl.h" #if !defined(LLONG_MIN) # ifdef TCL_WIDE_INT_IS_LONG diff --git a/generic/tclTest.c b/generic/tclTest.c index 0168a3d..8575658 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -19,7 +19,6 @@ #ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif -#include <sys/stat.h> #include "tclInt.h" #include "tclOO.h" #include <math.h> diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 6016c6d..f266443 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -10,7 +10,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #ifdef HAVE_GETATTRLIST diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 5cb35d2..bcf7d40 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -8,8 +8,6 @@ */ #include "tclInt.h" -#include <pwd.h> -#include <grp.h> #include <errno.h> #include <string.h> diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index a703935..d9952b9 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -40,10 +40,7 @@ * DAMAGE. */ -#include <sys/stat.h> #include "tclInt.h" -#include <utime.h> -#include <grp.h> #ifndef HAVE_STRUCT_STAT_ST_BLKSIZE #ifndef NO_FSTATFS #include <sys/statfs.h> @@ -245,7 +242,7 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; #endif /* NO_REALPATH */ #ifdef HAVE_FTS -#ifdef HAVE_STRUCT_STAT64 +#if defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__) /* fts doesn't do stat64 */ # define noFtsStat 1 #elif defined(__APPLE__) && defined(__LP64__) && \ diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index f1fedc3..5bfe5d9 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -10,7 +10,6 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #include "tclFileSystem.h" @@ -1182,9 +1181,10 @@ TclpUtime( int TclOSstat( const char *name, - Tcl_StatBuf *statBuf) + void *cygstat) { struct stat buf; + Tcl_StatBuf *statBuf = cygstat; int result = stat(name, &buf); statBuf->st_mode = buf.st_mode; @@ -1204,9 +1204,10 @@ TclOSstat( int TclOSlstat( const char *name, - Tcl_StatBuf *statBuf) + void *cygstat) { struct stat buf; + Tcl_StatBuf *statBuf = cygstat; int result = lstat(name, &buf); statBuf->st_mode = buf.st_mode; diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index daf3e7a..39be160 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -8,7 +8,6 @@ * All rights reserved. */ -#include <sys/stat.h> #include "tclInt.h" #include <stddef.h> #include <locale.h> diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index aa59258..59a35ba 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -21,10 +21,6 @@ #ifndef _TCLUNIXPORT #define _TCLUNIXPORT - -#ifndef MODULE_SCOPE -#define MODULE_SCOPE extern -#endif /* *--------------------------------------------------------------------------- @@ -89,26 +85,26 @@ typedef off_t Tcl_SeekOffset; # define SOCKET unsigned int # define WSAEWOULDBLOCK 10035 typedef unsigned short WCHAR; - DLLIMPORT extern __stdcall int GetModuleHandleExW(unsigned int, const char *, void *); - DLLIMPORT extern __stdcall int GetModuleFileNameW(void *, const char *, int); - DLLIMPORT extern __stdcall int WideCharToMultiByte(int, int, const char *, int, + __declspec(dllimport) extern __stdcall int GetModuleHandleExW(unsigned int, const char *, void *); + __declspec(dllimport) extern __stdcall int GetModuleFileNameW(void *, const char *, int); + __declspec(dllimport) extern __stdcall int WideCharToMultiByte(int, int, const char *, int, const char *, int, const char *, const char *); - DLLIMPORT extern __stdcall int MultiByteToWideChar(int, int, const char *, int, + __declspec(dllimport) extern __stdcall int MultiByteToWideChar(int, int, const char *, int, WCHAR *, int); - DLLIMPORT extern __stdcall void OutputDebugStringW(const WCHAR *); - DLLIMPORT extern __stdcall int IsDebuggerPresent(); + __declspec(dllimport) extern __stdcall void OutputDebugStringW(const WCHAR *); + __declspec(dllimport) extern __stdcall int IsDebuggerPresent(); - DLLIMPORT extern int cygwin_conv_path(int, const void *, void *, int); - DLLIMPORT extern int cygwin_conv_path_list(int, const void *, void *, int); + __declspec(dllimport) extern int cygwin_conv_path(int, const void *, void *, int); + __declspec(dllimport) extern int cygwin_conv_path_list(int, const void *, void *, int); # define USE_PUTENV 1 # define USE_PUTENV_FOR_UNSET 1 /* On Cygwin, the environment is imported from the Cygwin DLL. */ # define environ __cygwin_environ # define timezone _timezone - DLLIMPORT extern char **__cygwin_environ; - MODULE_SCOPE int TclOSstat(const char *name, Tcl_StatBuf *statBuf); - MODULE_SCOPE int TclOSlstat(const char *name, Tcl_StatBuf *statBuf); -#elif defined(HAVE_STRUCT_STAT64) + extern char **__cygwin_environ; + extern int TclOSstat(const char *name, void *statBuf); + extern int TclOSlstat(const char *name, void *statBuf); +#elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__) # define TclOSstat stat64 # define TclOSlstat lstat64 #else @@ -157,7 +153,7 @@ typedef off_t Tcl_SeekOffset; # include "../compat/unistd.h" #endif -MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode); +extern int TclUnixSetBlockingMode(int fd, int mode); #include <utime.h> @@ -735,14 +731,14 @@ typedef int socklen_t; #include <pwd.h> #include <grp.h> -MODULE_SCOPE struct passwd * TclpGetPwNam(const char *name); -MODULE_SCOPE struct group * TclpGetGrNam(const char *name); -MODULE_SCOPE struct passwd * TclpGetPwUid(uid_t uid); -MODULE_SCOPE struct group * TclpGetGrGid(gid_t gid); -MODULE_SCOPE struct hostent * TclpGetHostByName(const char *name); -MODULE_SCOPE struct hostent * TclpGetHostByAddr(const char *addr, +extern struct passwd * TclpGetPwNam(const char *name); +extern struct group * TclpGetGrNam(const char *name); +extern struct passwd * TclpGetPwUid(uid_t uid); +extern struct group * TclpGetGrGid(gid_t gid); +extern struct hostent * TclpGetHostByName(const char *name); +extern struct hostent * TclpGetHostByAddr(const char *addr, int length, int type); -MODULE_SCOPE void *TclpMakeTcpClientChannelMode( +extern void *TclpMakeTcpClientChannelMode( void *tcpSocket, int mode); #endif /* _TCLUNIXPORT */ diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 094a5e9..a2d0e40 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -11,7 +11,6 @@ */ #include "tclWinInt.h" -#include <sys/stat.h> /* * The following variable is used to tell whether this module has been diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 19e6abd..42405d4 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -12,7 +12,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclWinInt.h" #include "tclFileSystem.h" #include <winioctl.h> diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 3309858..f7ceabc 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -12,8 +12,6 @@ #include "tclWinInt.h" -#include <sys/stat.h> - /* * The following variable is used to tell whether this module has been * initialized. diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 84d97bd..9961b01 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -14,8 +14,6 @@ #include "tclWinInt.h" -#include <sys/stat.h> - /* * The following variable is used to tell whether this module has been * initialized. diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index b37eddf..6c4ed7f 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -13,9 +13,6 @@ #include "tclWinInt.h" -#include <float.h> -#include <sys/stat.h> - /* Workaround for mingw versions which don't provide this in float.h */ #ifndef _MCW_EM # define _MCW_EM 0x0008001F /* Error masks */ |