Check-in [61fafe8162]
Not logged in

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

Overview
Comment:Various changes to make life much easier on non-UNIX platforms (mostly Win32.)
Timelines: family | ancestors | descendants | both | dkf-64bit-support-branch
Files: files | file ages | folders
SHA1: 61fafe8162ed7ba460e578617458ead51d21760f
User & Date: dkf 2001-10-18 09:03:58.000
Context
2001-10-18
09:30
Removed some UNIX-specific stuff that had been left in by accident check-in: 703334faa8 user: dkf tags: dkf-64bit-support-branch
09:03
Various changes to make life much easier on non-UNIX platforms (mostly Win32.) check-in: 61fafe8162 user: dkf tags: dkf-64bit-support-branch
2001-10-17
09:28
Changes to make more use of what autoconf can discover. Also adds *lots* more cacheing of discovered... check-in: 23533208c0 user: dkf tags: dkf-64bit-support-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to compat/strtoull.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
 * strtoull.c --
 *
 *	Source code for the "strtoull" library procedure.
 *
 * Copyright (c) 1988 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.
 *
 * RCS: @(#) $Id: strtoull.c,v 1.1.2.1 2001/10/15 10:48:49 dkf Exp $
 */

#include "tcl.h"
#include <ctype.h>

/*
 * The table below is used to convert from ASCII digits to a











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
 * strtoull.c --
 *
 *	Source code for the "strtoull" library procedure.
 *
 * Copyright (c) 1988 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.
 *
 * RCS: @(#) $Id: strtoull.c,v 1.1.2.2 2001/10/18 09:03:58 dkf Exp $
 */

#include "tcl.h"
#include <ctype.h>

/*
 * The table below is used to convert from ASCII digits to a
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 *
 * Side effects:
 *	None.
 *
 *----------------------------------------------------------------------
 */

unsigned long long
strtoull(string, endPtr, base)
    char *string;		/* String of ASCII digits, possibly
				 * preceded by white space.  For bases
				 * greater than 10, either lower- or
				 * upper-case digits may be used.
				 */
    char **endPtr;		/* Where to store address of terminating
				 * character, or NULL. */
    int base;			/* Base for conversion.  Must be less
				 * than 37.  If 0, then the base is chosen
				 * from the leading characters of string:
				 * "0x" means hex, "0" means octal, anything
				 * else means decimal.
				 */
{
    register char *p;
    register unsigned long long result = 0;
    register unsigned digit;
    int anyDigits = 0;

    /*
     * Skip any leading blanks.
     */








|
















|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 *
 * Side effects:
 *	None.
 *
 *----------------------------------------------------------------------
 */

Tcl_WideUInt
strtoull(string, endPtr, base)
    char *string;		/* String of ASCII digits, possibly
				 * preceded by white space.  For bases
				 * greater than 10, either lower- or
				 * upper-case digits may be used.
				 */
    char **endPtr;		/* Where to store address of terminating
				 * character, or NULL. */
    int base;			/* Base for conversion.  Must be less
				 * than 37.  If 0, then the base is chosen
				 * from the leading characters of string:
				 * "0x" means hex, "0" means octal, anything
				 * else means decimal.
				 */
{
    register char *p;
    register Tcl_WideUInt result = 0;
    register unsigned digit;
    int anyDigits = 0;

    /*
     * Skip any leading blanks.
     */

Changes to generic/tcl.h.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 * Copyright (c) 1993-1996 Lucent Technologies.
 * Copyright (c) 1994-1998 Sun Microsystems, Inc.
 * Copyright (c) 1998-2000 by Scriptics Corporation.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tcl.h,v 1.102.2.16 2001/10/17 09:28:16 dkf Exp $
 */

#ifndef _TCL
#define _TCL


/*







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 * Copyright (c) 1993-1996 Lucent Technologies.
 * Copyright (c) 1994-1998 Sun Microsystems, Inc.
 * Copyright (c) 1998-2000 by Scriptics Corporation.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tcl.h,v 1.102.2.17 2001/10/18 09:03:59 dkf Exp $
 */

#ifndef _TCL
#define _TCL


/*
325
326
327
328
329
330
331
332


333
334
335
336
337
338
339
typedef int *ClientData;
#   endif /* __STDC__ */
#   define _CLIENTDATA
#endif


/*
 * Define Tcl_WideInt to be a type that is (at least) 64-bits wide.


 *
 * At the moment, this only works on Unix systems anyway...
 *
 * Also defines the following macros:
 * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on
 *	a real 64-bit system.)
 * TCL_PRINTF_SUPPORTS_LL - if we can do sprintf("%lld",wideVal) safely,







|
>
>







325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
typedef int *ClientData;
#   endif /* __STDC__ */
#   define _CLIENTDATA
#endif


/*
 * Define Tcl_WideInt to be a type that is (at least) 64-bits wide,
 * and define Tcl_WideUInt to be the unsigned variant of that type
 * (assuming that where we have one, we can have the other.)
 *
 * At the moment, this only works on Unix systems anyway...
 *
 * Also defines the following macros:
 * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on
 *	a real 64-bit system.)
 * TCL_PRINTF_SUPPORTS_LL - if we can do sprintf("%lld",wideVal) safely,
355
356
357
358
359
360
361
362

363
364
365
366
367
368
369
370
371
372
373


374
375
376
377
378
379


380
381
382
383
384
385
386
387

388
389
390
391
392
393
394
395
396
397
398
399
400





401
402
403

404
405
406
407
408
409
410
 * backwards) so any changes you make will need to be done
 * cautiously...
 *
 * Naturally, support for [format]ting of wide values is dependent on
 * TCL_PRINTF_SUPPORTS_LL
 */
#ifdef TCL_WIDE_INT_TYPE
typedef TCL_WIDE_INT_TYPE Tcl_WideInt;

#else
#   ifndef TCL_WIDE_INT_IS_LONG
#      if defined(_LP64)||defined(__ALPHA)||defined(__alpha)||defined(_AIX)
/*
 * Longs are 64-bit (or the compiler doesn't know how to do anything
 * else) so use them in all appropriate spots.
 */
#         define TCL_WIDE_INT_IS_LONG
#      else
#         ifdef __WIN32__
typedef __int64		Tcl_WideInt;


#         else
/*
 * Type of 64-bit values on 32-bit systems.  I think this is the ISO
 * C99 standard way of writing this type.
 */
typedef long long	Tcl_WideInt;


#         endif /* __WIN32__ */
#      endif  /* _LP64 | __ALPHA | __alpha | _AIX */
#   endif /* !TCL_WIDE_INT_IS_LONG */
#endif /* TCL_WIDE_INT_TYPE */

#ifdef TCL_WIDE_INT_IS_LONG
#   include <sys/types.h>
typedef long		Tcl_WideInt;

#   ifdef __WIN32__
typedef long		Tcl_SeekOffset;
#   else
typedef off_t		Tcl_SeekOffset;
#   endif
typedef struct stat	Tcl_StatBuf;
#   define Tcl_WideAsLong(val)		((long)(val))
#   define Tcl_LongAsWide(val)		((long)(val))
#   define Tcl_WideAsDouble(val)	((double)((long)(val)))
#   define Tcl_DoubleAsWide(val)	((long)((double)(val)))
#else /* TCL_WIDE_INT_IS_LONG */
#   define TCL_PRINTF_SUPPORTS_LL
#   ifdef __WIN32__





typedef struct _stati64	Tcl_StatBuf;
#      define TCL_LL_MODIFIER		"I64"
#      define TCL_LL_MODIFIER_SIZE	3

#   else
#      include <sys/types.h>
#      ifdef HAVE_STRUCT_STAT64
typedef struct stat64	Tcl_StatBuf;
#      else
typedef struct stat	Tcl_StatBuf;
#      endif /* HAVE_STRUCT_STAT64 */







|
>










|
>
>





|
>
>








>













>
>
>
>
>

|
|
>







357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
 * backwards) so any changes you make will need to be done
 * cautiously...
 *
 * Naturally, support for [format]ting of wide values is dependent on
 * TCL_PRINTF_SUPPORTS_LL
 */
#ifdef TCL_WIDE_INT_TYPE
typedef TCL_WIDE_INT_TYPE		Tcl_WideInt;
typedef unsigned TCL_WIDE_INT_TYPE	Tcl_WideUInt;
#else
#   ifndef TCL_WIDE_INT_IS_LONG
#      if defined(_LP64)||defined(__ALPHA)||defined(__alpha)||defined(_AIX)
/*
 * Longs are 64-bit (or the compiler doesn't know how to do anything
 * else) so use them in all appropriate spots.
 */
#         define TCL_WIDE_INT_IS_LONG
#      else
#         ifdef __WIN32__
typedef __int64			Tcl_WideInt;
typedef unsigned __int64	Tcl_WideUInt;
#            define TCL_WIDE_INT_TYPE __int64
#         else
/*
 * Type of 64-bit values on 32-bit systems.  I think this is the ISO
 * C99 standard way of writing this type.
 */
typedef long long		Tcl_WideInt;
typedef unsigned long long	Tcl_WideUInt;
#            define TCL_WIDE_INT_TYPE long long
#         endif /* __WIN32__ */
#      endif  /* _LP64 | __ALPHA | __alpha | _AIX */
#   endif /* !TCL_WIDE_INT_IS_LONG */
#endif /* TCL_WIDE_INT_TYPE */

#ifdef TCL_WIDE_INT_IS_LONG
#   include <sys/types.h>
typedef long		Tcl_WideInt;
typedef unsigned long	Tcl_WideInt;
#   ifdef __WIN32__
typedef long		Tcl_SeekOffset;
#   else
typedef off_t		Tcl_SeekOffset;
#   endif
typedef struct stat	Tcl_StatBuf;
#   define Tcl_WideAsLong(val)		((long)(val))
#   define Tcl_LongAsWide(val)		((long)(val))
#   define Tcl_WideAsDouble(val)	((double)((long)(val)))
#   define Tcl_DoubleAsWide(val)	((long)((double)(val)))
#else /* TCL_WIDE_INT_IS_LONG */
#   define TCL_PRINTF_SUPPORTS_LL
#   ifdef __WIN32__
#      ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;
#         define TCL_LL_MODIFIER	"L"
#         define TCL_LL_MODIFIER_SIZE	1
#      else /* __BORLANDC__ */
typedef struct _stati64	Tcl_StatBuf;
#         define TCL_LL_MODIFIER	"I64"
#         define TCL_LL_MODIFIER_SIZE	3
#      endif /* __BORLANDC__ */
#   else
#      include <sys/types.h>
#      ifdef HAVE_STRUCT_STAT64
typedef struct stat64	Tcl_StatBuf;
#      else
typedef struct stat	Tcl_StatBuf;
#      endif /* HAVE_STRUCT_STAT64 */
Changes to mac/tclMacChan.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
 * tclMacChan.c
 *
 *	Channel drivers for Macintosh channels for the
 *	console fds.
 *
 * Copyright (c) 1996-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclMacChan.c,v 1.7 2001/08/30 08:53:15 vincentdarley Exp $
 */

#include "tclInt.h"
#include "tclPort.h"
#include "tclMacInt.h"
#include <Aliases.h>
#include <Errors.h>











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
 * tclMacChan.c
 *
 *	Channel drivers for Macintosh channels for the
 *	console fds.
 *
 * Copyright (c) 1996-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclMacChan.c,v 1.7.6.1 2001/10/18 09:03:59 dkf Exp $
 */

#include "tclInt.h"
#include "tclPort.h"
#include "tclMacInt.h"
#include <Aliases.h>
#include <Errors.h>
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
static int		FileEventProc _ANSI_ARGS_((Tcl_Event *evPtr,
			    int flags));
static ThreadSpecificData *FileInit _ANSI_ARGS_((void));
static int		FileInput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toRead, int *errorCode));
static int		FileOutput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toWrite, int *errorCode));
static int		FileSeek _ANSI_ARGS_((ClientData instanceData,
			    long offset, int mode, int *errorCode));
static void		FileSetupProc _ANSI_ARGS_((ClientData clientData,
			    int flags));
static int		GetOpenMode _ANSI_ARGS_((Tcl_Interp *interp,
        		    CONST char *string));
static Tcl_Channel	OpenFileChannel _ANSI_ARGS_((CONST char *fileName, 
			    int mode, int permissions, int *errorCodePtr));
static int		StdIOBlockMode _ANSI_ARGS_((ClientData instanceData,
			    int mode));
static int		StdIOClose _ANSI_ARGS_((ClientData instanceData,
			    Tcl_Interp *interp));
static int		StdIOInput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toRead, int *errorCode));
static int		StdIOOutput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toWrite, int *errorCode));
static int		StdIOSeek _ANSI_ARGS_((ClientData instanceData,
			    long offset, int mode, int *errorCode));
static int		StdReady _ANSI_ARGS_((ClientData instanceData,
		            int mask));

/*
 * This structure describes the channel type structure for file based IO:
 */







|















|







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
static int		FileEventProc _ANSI_ARGS_((Tcl_Event *evPtr,
			    int flags));
static ThreadSpecificData *FileInit _ANSI_ARGS_((void));
static int		FileInput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toRead, int *errorCode));
static int		FileOutput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toWrite, int *errorCode));
static Tcl_WideInt	FileSeek _ANSI_ARGS_((ClientData instanceData,
			    long offset, int mode, int *errorCode));
static void		FileSetupProc _ANSI_ARGS_((ClientData clientData,
			    int flags));
static int		GetOpenMode _ANSI_ARGS_((Tcl_Interp *interp,
        		    CONST char *string));
static Tcl_Channel	OpenFileChannel _ANSI_ARGS_((CONST char *fileName, 
			    int mode, int permissions, int *errorCodePtr));
static int		StdIOBlockMode _ANSI_ARGS_((ClientData instanceData,
			    int mode));
static int		StdIOClose _ANSI_ARGS_((ClientData instanceData,
			    Tcl_Interp *interp));
static int		StdIOInput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toRead, int *errorCode));
static int		StdIOOutput _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toWrite, int *errorCode));
static Tcl_WideInt	StdIOSeek _ANSI_ARGS_((ClientData instanceData,
			    long offset, int mode, int *errorCode));
static int		StdReady _ANSI_ARGS_((ClientData instanceData,
		            int mask));

/*
 * This structure describes the channel type structure for file based IO:
 */
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
 * Side effects:
 *	Moves the location at which the channel will be accessed in
 *	future operations.
 *
 *----------------------------------------------------------------------
 */

static int
StdIOSeek(
    ClientData instanceData,			/* Unused. */
    long offset,				/* Offset to seek to. */
    int mode,					/* Relative to where
                                                 * should we seek? */
    int *errorCodePtr)				/* To store error code. */
{







|







580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
 * Side effects:
 *	Moves the location at which the channel will be accessed in
 *	future operations.
 *
 *----------------------------------------------------------------------
 */

static Tcl_WideInt
StdIOSeek(
    ClientData instanceData,			/* Unused. */
    long offset,				/* Offset to seek to. */
    int mode,					/* Relative to where
                                                 * should we seek? */
    int *errorCodePtr)				/* To store error code. */
{
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
 * Side effects:
 *	Moves the location at which the channel will be accessed in
 *	future operations.
 *
 *----------------------------------------------------------------------
 */

static int
FileSeek(
    ClientData instanceData,	/* Unused. */
    long offset,				/* Offset to seek to. */
    int mode,					/* Relative to where
                                 * should we seek? */
    int *errorCodePtr)			/* To store error code. */
{







|







1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
 * Side effects:
 *	Moves the location at which the channel will be accessed in
 *	future operations.
 *
 *----------------------------------------------------------------------
 */

static Tcl_WideInt
FileSeek(
    ClientData instanceData,	/* Unused. */
    long offset,				/* Offset to seek to. */
    int mode,					/* Relative to where
                                 * should we seek? */
    int *errorCodePtr)			/* To store error code. */
{
Changes to win/Makefile.in.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# This file is a Makefile for Tcl.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./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.54 2001/09/14 01:00:59 andreas_kupries Exp $

VERSION = @TCL_VERSION@

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# This file is a Makefile for Tcl.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./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.54.2.1 2001/10/18 09:03:59 dkf Exp $

VERSION = @TCL_VERSION@

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
	tclWinNotify.$(OBJEXT) \
	tclWinPipe.$(OBJEXT) \
	tclWinSock.$(OBJEXT) \
	tclWinThrd.$(OBJEXT) \
	tclWinTime.$(OBJEXT) 

COMPAT_OBJS = \
	strftime.$(OBJEXT)

PIPE_OBJS = stub16.$(OBJEXT)

DDE_OBJS = tclWinDde.$(OBJEXT)

REG_OBJS = tclWinReg.$(OBJEXT)








|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
	tclWinNotify.$(OBJEXT) \
	tclWinPipe.$(OBJEXT) \
	tclWinSock.$(OBJEXT) \
	tclWinThrd.$(OBJEXT) \
	tclWinTime.$(OBJEXT) 

COMPAT_OBJS = \
	strftime.$(OBJEXT) strtoll.$(OBJEXT) strtoull.$(OBJEXT)

PIPE_OBJS = stub16.$(OBJEXT)

DDE_OBJS = tclWinDde.$(OBJEXT)

REG_OBJS = tclWinReg.$(OBJEXT)

Changes to win/makefile.bc.
171
172
173
174
175
176
177


178
179
180
181
182
183
184

TCLOBJS	= \
	$(TMPDIR)\regcomp.obj \
	$(TMPDIR)\regexec.obj \
	$(TMPDIR)\regfree.obj \
	$(TMPDIR)\regerror.obj \
	$(TMPDIR)\strftime.obj \


	$(TMPDIR)\tclAlloc.obj \
	$(TMPDIR)\tclAsync.obj \
	$(TMPDIR)\tclBasic.obj \
	$(TMPDIR)\tclBinary.obj \
	$(TMPDIR)\tclCkalloc.obj \
	$(TMPDIR)\tclClock.obj \
	$(TMPDIR)\tclCmdAH.obj \







>
>







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

TCLOBJS	= \
	$(TMPDIR)\regcomp.obj \
	$(TMPDIR)\regexec.obj \
	$(TMPDIR)\regfree.obj \
	$(TMPDIR)\regerror.obj \
	$(TMPDIR)\strftime.obj \
	$(TMPDIR)\strtoll.obj \
	$(TMPDIR)\strtoull.obj \
	$(TMPDIR)\tclAlloc.obj \
	$(TMPDIR)\tclAsync.obj \
	$(TMPDIR)\tclBasic.obj \
	$(TMPDIR)\tclBinary.obj \
	$(TMPDIR)\tclCkalloc.obj \
	$(TMPDIR)\tclClock.obj \
	$(TMPDIR)\tclCmdAH.obj \
Changes to win/makefile.vc.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Visual C++ makefile
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# RCS: @(#) $Id: makefile.vc,v 1.65 2001/09/14 01:00:59 andreas_kupries Exp $

# Does not depend on the presence of any environment variables in
# order to compile tcl; all needed information is derived from 
# location of the compiler directories.

#
# Project directories








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Visual C++ makefile
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# RCS: @(#) $Id: makefile.vc,v 1.65.2.1 2001/10/18 09:03:59 dkf Exp $

# Does not depend on the presence of any environment variables in
# order to compile tcl; all needed information is derived from 
# location of the compiler directories.

#
# Project directories
159
160
161
162
163
164
165


166
167
168
169
170
171
172

TCLOBJS = \
	$(TMPDIR)\regcomp.obj \
	$(TMPDIR)\regexec.obj \
	$(TMPDIR)\regfree.obj \
	$(TMPDIR)\regerror.obj \
	$(TMPDIR)\strftime.obj \


	$(TMPDIR)\tclAlloc.obj \
	$(TMPDIR)\tclAsync.obj \
	$(TMPDIR)\tclBasic.obj \
	$(TMPDIR)\tclBinary.obj \
	$(TMPDIR)\tclCkalloc.obj \
	$(TMPDIR)\tclClock.obj \
	$(TMPDIR)\tclCmdAH.obj \







>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

TCLOBJS = \
	$(TMPDIR)\regcomp.obj \
	$(TMPDIR)\regexec.obj \
	$(TMPDIR)\regfree.obj \
	$(TMPDIR)\regerror.obj \
	$(TMPDIR)\strftime.obj \
	$(TMPDIR)\strtoll.obj \
	$(TMPDIR)\strtoull.obj \
	$(TMPDIR)\tclAlloc.obj \
	$(TMPDIR)\tclAsync.obj \
	$(TMPDIR)\tclBasic.obj \
	$(TMPDIR)\tclBinary.obj \
	$(TMPDIR)\tclCkalloc.obj \
	$(TMPDIR)\tclClock.obj \
	$(TMPDIR)\tclCmdAH.obj \
Changes to win/tclWinChan.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
 * tclWinChan.c
 *
 *	Channel drivers for Windows channels based on files, command
 *	pipes and TCP sockets.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinChan.c,v 1.15 2001/09/07 17:08:50 andreas_kupries Exp $
 */

#include "tclWinInt.h"

/*
 * State flags used in the info structures below.
 */











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 
 * tclWinChan.c
 *
 *	Channel drivers for Windows channels based on files, command
 *	pipes and TCP sockets.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinChan.c,v 1.15.6.1 2001/10/18 09:03:59 dkf Exp $
 */

#include "tclWinInt.h"

/*
 * State flags used in the info structures below.
 */
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
static int		FileGetHandleProc _ANSI_ARGS_((ClientData instanceData,
		            int direction, ClientData *handlePtr));
static ThreadSpecificData *FileInit _ANSI_ARGS_((void));
static int		FileInputProc _ANSI_ARGS_((ClientData instanceData,
	            	    char *buf, int toRead, int *errorCode));
static int		FileOutputProc _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toWrite, int *errorCode));
static int		FileSeekProc _ANSI_ARGS_((ClientData instanceData,
			    long offset, int mode, int *errorCode));
static void		FileSetupProc _ANSI_ARGS_((ClientData clientData,
			    int flags));
static void		FileWatchProc _ANSI_ARGS_((ClientData instanceData,
		            int mask));

			    







|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
static int		FileGetHandleProc _ANSI_ARGS_((ClientData instanceData,
		            int direction, ClientData *handlePtr));
static ThreadSpecificData *FileInit _ANSI_ARGS_((void));
static int		FileInputProc _ANSI_ARGS_((ClientData instanceData,
	            	    char *buf, int toRead, int *errorCode));
static int		FileOutputProc _ANSI_ARGS_((ClientData instanceData,
			    char *buf, int toWrite, int *errorCode));
static Tcl_WideInt	FileSeekProc _ANSI_ARGS_((ClientData instanceData,
			    long offset, int mode, int *errorCode));
static void		FileSetupProc _ANSI_ARGS_((ClientData clientData,
			    int flags));
static void		FileWatchProc _ANSI_ARGS_((ClientData instanceData,
		            int mask));

			    
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
 * Side effects:
 *	Moves the location at which the channel will be accessed in
 *	future operations.
 *
 *----------------------------------------------------------------------
 */

static int
FileSeekProc(instanceData, offset, mode, errorCodePtr)
    ClientData instanceData;			/* File state. */
    long offset;				/* Offset to seek to. */
    int mode;					/* Relative to where
                                                 * should we seek? */
    int *errorCodePtr;				/* To store error code. */
{







|







427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
 * Side effects:
 *	Moves the location at which the channel will be accessed in
 *	future operations.
 *
 *----------------------------------------------------------------------
 */

static Tcl_WideInt
FileSeekProc(instanceData, offset, mode, errorCodePtr)
    ClientData instanceData;			/* File state. */
    long offset;				/* Offset to seek to. */
    int mode;					/* Relative to where
                                                 * should we seek? */
    int *errorCodePtr;				/* To store error code. */
{
Changes to win/tclWinPort.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * tclWinPort.h --
 *
 *	This header file handles porting issues that occur because of
 *	differences between Windows and Unix. It should be the only
 *	file that contains #ifdefs to handle different flavors of OS.
 *
 * Copyright (c) 1994-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinPort.h,v 1.22 2001/09/20 18:33:55 hobbs Exp $
 */

#ifndef _TCLWINPORT
#define _TCLWINPORT

#ifndef _TCLINT
#   include "tclInt.h"












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * tclWinPort.h --
 *
 *	This header file handles porting issues that occur because of
 *	differences between Windows and Unix. It should be the only
 *	file that contains #ifdefs to handle different flavors of OS.
 *
 * Copyright (c) 1994-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinPort.h,v 1.22.2.1 2001/10/18 09:03:59 dkf Exp $
 */

#ifndef _TCLWINPORT
#define _TCLWINPORT

#ifndef _TCLINT
#   include "tclInt.h"
460
461
462
463
464
465
466







467
468
469
470
471
472
473
#else
typedef int TclpMutex;
#define	TclpMutexInit(a)
#define	TclpMutexLock(a)
#define	TclpMutexUnlock(a)
#endif /* TCL_THREADS */








#include "tclPlatDecls.h"
#include "tclIntPlatDecls.h"

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT

#endif /* _TCLWINPORT */







>
>
>
>
>
>
>







460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
#else
typedef int TclpMutex;
#define	TclpMutexInit(a)
#define	TclpMutexLock(a)
#define	TclpMutexUnlock(a)
#endif /* TCL_THREADS */

#ifdef TCL_WIDE_INT_TYPE
EXTERN Tcl_WideInt	strtoll _ANSI_ARGS_((char *string,  char **endPtr,
					     int base));
EXTERN Tcl_WideUInt	strtoull _ANSI_ARGS_((char *string,  char **endPtr,
					      int base));
#endif /* TCL_WIDE_INT_TYPE */

#include "tclPlatDecls.h"
#include "tclIntPlatDecls.h"

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT

#endif /* _TCLWINPORT */