Tcl Source Code

Check-in [1a117d1880]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:move TCHAR definition for Cygwin from tclUnixPort.h to tclPlatDecls.h, so it can be used for the Plat* interfaces as well
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-4-branch
Files: files | file ages | folders
SHA1:1a117d1880ac80d8a6b184029e625354e0281514
User & Date: jan.nijtmans 2012-05-07 06:33:12
Context
2012-05-10
20:38
[Bug 473946]: special characters not correctly sen check-in: 98d6eb2b34 user: jan.nijtmans tags: core-8-4-branch
2012-05-07
08:21
move TCHAR definition for Cygwin from tclUnixPort.h to tclPlatDecls.h, so it can be used for the Pla... check-in: d87557d5c3 user: jan.nijtmans tags: core-8-5-branch
07:50
proposal from jmphilippe check-in: 6036f72024 user: jan.nijtmans tags: bug-473946
06:33
move TCHAR definition for Cygwin from tclUnixPort.h to tclPlatDecls.h, so it can be used for the Pl... check-in: 1a117d1880 user: jan.nijtmans tags: core-8-4-branch
2012-05-03
20:55
don't try to run the cpuid test if cpuid is not available check-in: aa572ec793 user: jan.nijtmans tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIOSock.c.

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 * Side effects:
 *	Sets SO_SNDBUF and SO_RCVBUF sizes.
 *
 *----------------------------------------------------------------------
 */

#undef TclSockMinimumBuffers
#ifndef _WIN32
#   define SOCKET int
#endif

int
TclSockMinimumBuffers(sock, size)
    void *sock;			/* Socket file descriptor */
    int size;			/* Minimum buffer size */






|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 * Side effects:
 *	Sets SO_SNDBUF and SO_RCVBUF sizes.
 *
 *----------------------------------------------------------------------
 */

#undef TclSockMinimumBuffers
#if !defined(_WIN32) && !defined(__CYGWIN__)
#   define SOCKET int
#endif

int
TclSockMinimumBuffers(sock, size)
    void *sock;			/* Socket file descriptor */
    int size;			/* Minimum buffer size */

Changes to generic/tclPlatDecls.h.

7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22
23
24
25
26

27
28
29
30
31
32
33
 * All rights reserved.
 */

#ifndef _TCLPLATDECLS
#define _TCLPLATDECLS

/*
 *  Pull in the typedef of TCHAR for windows.

 */
#if defined(__WIN32__) && !defined(_TCHAR_DEFINED)
#   include <tchar.h>
#   ifndef _TCHAR_DEFINED
	/* Borland seems to forget to set this. */
        typedef _TCHAR TCHAR;
#	define _TCHAR_DEFINED
#   endif
#   if defined(_MSC_VER) && defined(__STDC__)
	/* MSVC++ misses this. */
	typedef _TCHAR TCHAR;
#   endif

#endif

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */






|
>

|
<
|
<
|
<
|
<
<
|

>







7
8
9
10
11
12
13
14
15
16
17

18

19

20


21
22
23
24
25
26
27
28
29
30
 * All rights reserved.
 */

#ifndef _TCLPLATDECLS
#define _TCLPLATDECLS

/*
 * TCHAR is needed here for win32, so if it is not defined yet do it here.
 * This way, we don't need to include <tchar.h> just for one define.
 */
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED)

#   if defined(_UNICODE)

	typedef wchar_t TCHAR;

#   else


	typedef char TCHAR;
#   endif
#   define _TCHAR_DEFINED
#endif

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */

Changes to unix/tclUnixPort.h.

79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
#   define DWORD unsigned int
#   define CP_UTF8 65001
#   define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
#   define HANDLE void *
#   define HINSTANCE void *
#   define SOCKET unsigned int
#   define WSAEWOULDBLOCK 10035
    typedef char TCHAR;
    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,
	    const char *, int, const char *, const char *);

    DLLIMPORT extern int cygwin_conv_to_full_posix_path(const char *, char *);
    EXTERN int TclOSstat(const char *name, Tcl_StatBuf *statBuf);
................................................................................
#include <pthread.h>
typedef pthread_mutex_t TclpMutex;
EXTERN void	TclpMutexInit _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void	TclpMutexLock _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void	TclpMutexUnlock _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN Tcl_DirEntry * 	TclpReaddir(DIR *);
#ifndef TclpLocaltime
EXTERN struct tm *     	TclpLocaltime(TclpTime_t_CONST);
#endif
#ifndef TclpGmtime
EXTERN struct tm *     	TclpGmtime(TclpTime_t_CONST);
#endif
#define inet_ntoa(x)	TclpInetNtoa(x)
#else
typedef int TclpMutex;
#define	TclpMutexInit(a)
#define	TclpMutexLock(a)
#define	TclpMutexUnlock(a)






<







 







|


|







79
80
81
82
83
84
85

86
87
88
89
90
91
92
...
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
#   define DWORD unsigned int
#   define CP_UTF8 65001
#   define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
#   define HANDLE void *
#   define HINSTANCE void *
#   define SOCKET unsigned int
#   define WSAEWOULDBLOCK 10035

    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,
	    const char *, int, const char *, const char *);

    DLLIMPORT extern int cygwin_conv_to_full_posix_path(const char *, char *);
    EXTERN int TclOSstat(const char *name, Tcl_StatBuf *statBuf);
................................................................................
#include <pthread.h>
typedef pthread_mutex_t TclpMutex;
EXTERN void	TclpMutexInit _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void	TclpMutexLock _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void	TclpMutexUnlock _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN Tcl_DirEntry * 	TclpReaddir(DIR *);
#ifndef TclpLocaltime
EXTERN struct tm *TclpLocaltime(TclpTime_t_CONST);
#endif
#ifndef TclpGmtime
EXTERN struct tm *TclpGmtime(TclpTime_t_CONST);
#endif
#define inet_ntoa(x)	TclpInetNtoa(x)
#else
typedef int TclpMutex;
#define	TclpMutexInit(a)
#define	TclpMutexLock(a)
#define	TclpMutexUnlock(a)

Changes to win/tclWinDde.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include "tclPort.h"
#include <dde.h>
#include <ddeml.h>
#include <tchar.h>

/*
 * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the
 * Registry_Init declaration is in the source file itself, which is only
 * accessed when we are building a library.
 */







<







10
11
12
13
14
15
16

17
18
19
20
21
22
23
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include "tclPort.h"
#include <dde.h>
#include <ddeml.h>


/*
 * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the
 * Registry_Init declaration is in the source file itself, which is only
 * accessed when we are building a library.
 */