summaryrefslogtreecommitdiffstats
path: root/generic/tclIntPlatDecls.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-02 09:45:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-02 09:45:33 (GMT)
commit968face14f7b3c39dab97d0457c869427402bc63 (patch)
treebaa804a74e866af1714879cd34feea75a7700cda /generic/tclIntPlatDecls.h
parent258e927279e1a28d29a07a1c07ebee9a99890e69 (diff)
parent876a8aba8471fbe03407e0b3af2e44c194942141 (diff)
downloadtcl-968face14f7b3c39dab97d0457c869427402bc63.zip
tcl-968face14f7b3c39dab97d0457c869427402bc63.tar.gz
tcl-968face14f7b3c39dab97d0457c869427402bc63.tar.bz2
[Bug 3508771] load tclreg.dll in cygwin tclsh
Implement TclWinGetTclInstance, TclpGetTZName, and various others for Cygwin
Diffstat (limited to 'generic/tclIntPlatDecls.h')
-rw-r--r--generic/tclIntPlatDecls.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 5d3e2ab..20da2fd 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -58,12 +58,12 @@ EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
/* 3 */
EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
/* 4 */
-EXTERN int TclWinGetTclInstance(void);
+EXTERN void * TclWinGetTclInstance(void);
/* Slot 5 is reserved */
/* 6 */
EXTERN unsigned short TclWinNToHS(unsigned short ns);
/* 7 */
-EXTERN int TclWinSetSockOpt(int s, int level, int optname,
+EXTERN int TclWinSetSockOpt(void *s, int level, int optname,
const char *optval, int optlen);
/* 8 */
EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
@@ -96,7 +96,7 @@ EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
EXTERN void TclMacOSXNotifierAddRunLoopMode(
const void *runLoopMode);
/* 20 */
-EXTERN void TclWinAddProcess(void *hProcess, unsigned long id);
+EXTERN void TclWinAddProcess(void *hProcess, unsigned int id);
/* Slot 21 is reserved */
/* 22 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
@@ -129,7 +129,7 @@ EXTERN struct servent * TclWinGetServByName(const char *nm,
const char *proto);
/* 3 */
EXTERN int TclWinGetSockOpt(SOCKET s, int level, int optname,
- char FAR *optval, int FAR *optlen);
+ char *optval, int *optlen);
/* 4 */
EXTERN HINSTANCE TclWinGetTclInstance(void);
/* Slot 5 is reserved */
@@ -137,7 +137,7 @@ EXTERN HINSTANCE TclWinGetTclInstance(void);
EXTERN u_short TclWinNToHS(u_short ns);
/* 7 */
EXTERN int TclWinSetSockOpt(SOCKET s, int level, int optname,
- const char FAR *optval, int optlen);
+ const char *optval, int optlen);
/* 8 */
EXTERN unsigned long TclpGetPid(Tcl_Pid pid);
/* 9 */
@@ -196,12 +196,12 @@ EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
/* 3 */
EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
/* 4 */
-EXTERN int TclWinGetTclInstance(void);
+EXTERN void * TclWinGetTclInstance(void);
/* Slot 5 is reserved */
/* 6 */
EXTERN unsigned short TclWinNToHS(unsigned short ns);
/* 7 */
-EXTERN int TclWinSetSockOpt(int s, int level, int optname,
+EXTERN int TclWinSetSockOpt(void *s, int level, int optname,
const char *optval, int optlen);
/* 8 */
EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
@@ -240,7 +240,7 @@ EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
EXTERN void TclMacOSXNotifierAddRunLoopMode(
const void *runLoopMode);
/* 20 */
-EXTERN void TclWinAddProcess(void *hProcess, unsigned long id);
+EXTERN void TclWinAddProcess(void *hProcess, unsigned int id);
/* Slot 21 is reserved */
/* 22 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
@@ -273,10 +273,10 @@ typedef struct TclIntPlatStubs {
void (*tclWinConvertWSAError) (unsigned int errCode); /* 1 */
Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
- int (*tclWinGetTclInstance) (void); /* 4 */
+ void * (*tclWinGetTclInstance) (void); /* 4 */
void (*reserved5)(void);
unsigned short (*tclWinNToHS) (unsigned short ns); /* 6 */
- int (*tclWinSetSockOpt) (int s, int level, int optname, const char *optval, int optlen); /* 7 */
+ int (*tclWinSetSockOpt) (void *s, int level, int optname, const char *optval, int optlen); /* 7 */
int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
int (*tclWinGetPlatformId) (void); /* 9 */
Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */
@@ -289,7 +289,7 @@ typedef struct TclIntPlatStubs {
void (*reserved17)(void);
int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
- void (*tclWinAddProcess) (void *hProcess, unsigned long id); /* 20 */
+ void (*tclWinAddProcess) (void *hProcess, unsigned int id); /* 20 */
void (*reserved21)(void);
TclFile (*tclpCreateTempFile) (const char *contents); /* 22 */
char * (*tclpGetTZName) (int isdst); /* 23 */
@@ -306,11 +306,11 @@ typedef struct TclIntPlatStubs {
void (*tclWinConvertError) (DWORD errCode); /* 0 */
void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */
struct servent * (*tclWinGetServByName) (const char *nm, const char *proto); /* 2 */
- int (*tclWinGetSockOpt) (SOCKET s, int level, int optname, char FAR *optval, int FAR *optlen); /* 3 */
+ int (*tclWinGetSockOpt) (SOCKET s, int level, int optname, char *optval, int *optlen); /* 3 */
HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */
void (*reserved5)(void);
u_short (*tclWinNToHS) (u_short ns); /* 6 */
- int (*tclWinSetSockOpt) (SOCKET s, int level, int optname, const char FAR *optval, int optlen); /* 7 */
+ int (*tclWinSetSockOpt) (SOCKET s, int level, int optname, const char *optval, int optlen); /* 7 */
unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */
int (*tclWinGetPlatformId) (void); /* 9 */
void (*reserved10)(void);
@@ -339,10 +339,10 @@ typedef struct TclIntPlatStubs {
void (*tclWinConvertWSAError) (unsigned int errCode); /* 1 */
Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
- int (*tclWinGetTclInstance) (void); /* 4 */
+ void * (*tclWinGetTclInstance) (void); /* 4 */
void (*reserved5)(void);
unsigned short (*tclWinNToHS) (unsigned short ns); /* 6 */
- int (*tclWinSetSockOpt) (int s, int level, int optname, const char *optval, int optlen); /* 7 */
+ int (*tclWinSetSockOpt) (void *s, int level, int optname, const char *optval, int optlen); /* 7 */
int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
int (*tclWinGetPlatformId) (void); /* 9 */
Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */
@@ -355,7 +355,7 @@ typedef struct TclIntPlatStubs {
int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */
int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
- void (*tclWinAddProcess) (void *hProcess, unsigned long id); /* 20 */
+ void (*tclWinAddProcess) (void *hProcess, unsigned int id); /* 20 */
void (*reserved21)(void);
TclFile (*tclpCreateTempFile) (const char *contents); /* 22 */
char * (*tclpGetTZName) (int isdst); /* 23 */
@@ -573,6 +573,9 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#define TCL_STORAGE_CLASS DLLIMPORT
#undef TclpLocaltime_unix
#undef TclpGmtime_unix
+#undef TclWinConvertWSAError
+#define TclWinConvertWSAError TclWinConvertError
+
#if !defined(__WIN32__) && defined(USE_TCL_STUBS)
# ifdef __CYGWIN__