Tcl Source Code

Check-in [904f4fe3fe]
Login

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

Overview
Comment:some formatting (*.decls) move up #undef, for macro which is conflicting with later stuff. remove some unused cygwin-related code some minor gcc warnings
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 904f4fe3fe9470216e36377ce7e9edcdc398ea25
User & Date: jan.nijtmans 2012-04-04 20:17:52
Context
2012-04-05
07:07
cygwin should use SetEnvironmentVariable for windows env check-in: d39be5f098 user: jan.nijtmans tags: core-8-5-branch
2012-04-04
20:37
some formatting (*.decls) remove some unused cygwin-related code some minor gcc warnings check-in: 804d7eee7c user: jan.nijtmans tags: trunk
20:17
some formatting (*.decls) move up #undef, for macro which is conflicting with later stuff. remove so... check-in: 904f4fe3fe user: jan.nijtmans tags: core-8-5-branch
18:52
tclStubInit.c: move up #undef, so it is clear that this macro is conflicting with another definition... check-in: 206b9b100a user: jan.nijtmans tags: core-8-4-branch
14:48
Quick workaround for busted branch tip. check-in: 9fc4ed3a6d user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclCmdMZ.c.

3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
	{"toupper",	StringUpperCmd,	NULL},
	{"totitle",	StringTitleCmd,	NULL},
	{"trim",	StringTrimCmd,	NULL},
	{"trimleft",	StringTrimLCmd,	NULL},
	{"trimright",	StringTrimRCmd,	NULL},
	{"wordend",	StringEndCmd,	NULL},
	{"wordstart",	StringStartCmd,	NULL},
	{NULL}
    };

    return TclMakeEnsemble(interp, "string", stringImplMap);
}

/*
 *----------------------------------------------------------------------







|







3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
	{"toupper",	StringUpperCmd,	NULL},
	{"totitle",	StringTitleCmd,	NULL},
	{"trim",	StringTrimCmd,	NULL},
	{"trimleft",	StringTrimLCmd,	NULL},
	{"trimright",	StringTrimRCmd,	NULL},
	{"wordend",	StringEndCmd,	NULL},
	{"wordstart",	StringStartCmd,	NULL},
	{NULL, NULL, NULL}
    };

    return TclMakeEnsemble(interp, "string", stringImplMap);
}

/*
 *----------------------------------------------------------------------

Changes to generic/tclCompile.c.

393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
	/* Test if array element exists; array at slot op1, element is
	 * stktop */
    {"existArrayStk",	 1,    -1,        0,	{OPERAND_NONE}},
	/* Test if array element exists; element is stktop, array name is
	 * stknext */
    {"existStk",	 1,    0,         0,	{OPERAND_NONE}},
	/* Test if general variable exists; unparsed variable name is stktop*/
    {0}
};

/*
 * Prototypes for procedures defined later in this file:
 */

static void		DupByteCodeInternalRep(Tcl_Obj *srcPtr,







|







393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
	/* Test if array element exists; array at slot op1, element is
	 * stktop */
    {"existArrayStk",	 1,    -1,        0,	{OPERAND_NONE}},
	/* Test if array element exists; element is stktop, array name is
	 * stknext */
    {"existStk",	 1,    0,         0,	{OPERAND_NONE}},
	/* Test if general variable exists; unparsed variable name is stktop*/
    {0, 0, 0, 0, {0}}
};

/*
 * Prototypes for procedures defined later in this file:
 */

static void		DupByteCodeInternalRep(Tcl_Obj *srcPtr,

Changes to generic/tclDictObj.c.

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
    {"replace",	DictReplaceCmd,	NULL },
    {"set",	DictSetCmd,	TclCompileDictSetCmd },
    {"size",	DictSizeCmd,	NULL },
    {"unset",	DictUnsetCmd,	NULL },
    {"update",	DictUpdateCmd,	TclCompileDictUpdateCmd },
    {"values",	DictValuesCmd,	NULL },
    {"with",	DictWithCmd,	NULL },
    {NULL}
};

/*
 * Internal representation of the entries in the hash table that backs a
 * dictionary.
 */








|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
    {"replace",	DictReplaceCmd,	NULL },
    {"set",	DictSetCmd,	TclCompileDictSetCmd },
    {"size",	DictSizeCmd,	NULL },
    {"unset",	DictUnsetCmd,	NULL },
    {"update",	DictUpdateCmd,	TclCompileDictUpdateCmd },
    {"values",	DictValuesCmd,	NULL },
    {"with",	DictWithCmd,	NULL },
    {NULL, NULL, NULL}
};

/*
 * Internal representation of the entries in the hash table that backs a
 * dictionary.
 */

Changes to generic/tclExecute.c.

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
    {"abs", 1},
    {"double", 1},
    {"int", 1},
    {"rand", 0},
    {"round", 1},
    {"srand", 1},
    {"wide", 1},
    {0},
};

#define LAST_BUILTIN_FUNC	25
#endif

/*
 * These variable-access macros have to coincide with those in tclVar.c







|







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
    {"abs", 1},
    {"double", 1},
    {"int", 1},
    {"rand", 0},
    {"round", 1},
    {"srand", 1},
    {"wide", 1},
    {NULL, 0},
};

#define LAST_BUILTIN_FUNC	25
#endif

/*
 * These variable-access macros have to coincide with those in tclVar.c

Changes to generic/tclFileName.c.

2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
			name[1] == '\\')) || (*name == '/')) {
		    Tcl_DStringAppend(&append, "/", 1);
		} else {
		    Tcl_DStringAppend(&append, ".", 1);
		}
	    }

#if defined(__CYGWIN__) && defined(__WIN32__)
	    {
		char winbuf[MAX_PATH+1];

		cygwin_conv_to_win32_path(Tcl_DStringValue(&append), winbuf);
		Tcl_DStringFree(&append);
		Tcl_DStringAppend(&append, winbuf, -1);
	    }
#endif /* __CYGWIN__ && __WIN32__ */
	    break;

	case TCL_PLATFORM_UNIX:
	    if (length == 0 && (Tcl_DStringLength(&append) == 0)) {
		if ((*name == '\\' && name[1] == '/') || (*name == '/')) {
		    Tcl_DStringAppend(&append, "/", 1);
		} else {







<
<
<
<
<
<
<
<
<







2427
2428
2429
2430
2431
2432
2433









2434
2435
2436
2437
2438
2439
2440
			name[1] == '\\')) || (*name == '/')) {
		    Tcl_DStringAppend(&append, "/", 1);
		} else {
		    Tcl_DStringAppend(&append, ".", 1);
		}
	    }










	    break;

	case TCL_PLATFORM_UNIX:
	    if (length == 0 && (Tcl_DStringLength(&append) == 0)) {
		if ((*name == '\\' && name[1] == '/') || (*name == '/')) {
		    Tcl_DStringAppend(&append, "/", 1);
		} else {

Changes to generic/tclIOSock.c.

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

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

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







|







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

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

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

Changes to generic/tclIOUtil.c.

395
396
397
398
399
400
401

402
403
404
405
406
407
408
 * will never be freed.
 */

static FilesystemRecord nativeFilesystemRecord = {
    NULL,
    &tclNativeFilesystem,
    1,

    NULL
};

/*
 * This is incremented each time we modify the linked list of filesystems. Any
 * time it changes, all cached filesystem representations are suspect and must
 * be freed. For multithreading builds, change of the filesystem epoch will







>







395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
 * will never be freed.
 */

static FilesystemRecord nativeFilesystemRecord = {
    NULL,
    &tclNativeFilesystem,
    1,
    NULL,
    NULL
};

/*
 * This is incremented each time we modify the linked list of filesystems. Any
 * time it changes, all cached filesystem representations are suspect and must
 * be freed. For multithreading builds, change of the filesystem epoch will

Changes to generic/tclInt.decls.

722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
    void TclCleanupVar(Var *varPtr, Var *arrayPtr)
}
declare 177 {
    void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *part2,
	    const char *operation, const char *reason)
}
declare 178 {
    void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char* encodingName)
}
declare 179 {
    Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr)
}

# TclpGmtime and TclpLocaltime promoted to the generic interface from unix








|







722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
    void TclCleanupVar(Var *varPtr, Var *arrayPtr)
}
declare 177 {
    void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *part2,
	    const char *operation, const char *reason)
}
declare 178 {
    void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char *encodingName)
}
declare 179 {
    Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr)
}

# TclpGmtime and TclpLocaltime promoted to the generic interface from unix

928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943

# Tcl_Obj leak detection support.
declare 243 {
    void TclDbDumpActiveObjects(FILE *outFile)
}

declare 249 {
    char* TclDoubleDigits(double dv, int ndigits, int flags,
			  int* decpt, int* signum, char** endPtr)
}

##############################################################################

# Define the platform specific internal Tcl interface. These functions are
# only available on the designated platform.








|
|







928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943

# Tcl_Obj leak detection support.
declare 243 {
    void TclDbDumpActiveObjects(FILE *outFile)
}

declare 249 {
    char *TclDoubleDigits(double dv, int ndigits, int flags,
			  int *decpt, int *signum, char **endPtr)
}

##############################################################################

# Define the platform specific internal Tcl interface. These functions are
# only available on the designated platform.

Changes to generic/tclIntDecls.h.

827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
				CONST char *part2, CONST char *operation,
				CONST char *reason);
#endif
#ifndef Tcl_SetStartupScript_TCL_DECLARED
#define Tcl_SetStartupScript_TCL_DECLARED
/* 178 */
EXTERN void		Tcl_SetStartupScript(Tcl_Obj *pathPtr,
				CONST char*encodingName);
#endif
#ifndef Tcl_GetStartupScript_TCL_DECLARED
#define Tcl_GetStartupScript_TCL_DECLARED
/* 179 */
EXTERN Tcl_Obj *	Tcl_GetStartupScript(CONST char **encodingNamePtr);
#endif
/* Slot 180 is reserved */







|







827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
				CONST char *part2, CONST char *operation,
				CONST char *reason);
#endif
#ifndef Tcl_SetStartupScript_TCL_DECLARED
#define Tcl_SetStartupScript_TCL_DECLARED
/* 178 */
EXTERN void		Tcl_SetStartupScript(Tcl_Obj *pathPtr,
				CONST char *encodingName);
#endif
#ifndef Tcl_GetStartupScript_TCL_DECLARED
#define Tcl_GetStartupScript_TCL_DECLARED
/* 179 */
EXTERN Tcl_Obj *	Tcl_GetStartupScript(CONST char **encodingNamePtr);
#endif
/* Slot 180 is reserved */
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
/* Slot 245 is reserved */
/* Slot 246 is reserved */
/* Slot 247 is reserved */
/* Slot 248 is reserved */
#ifndef TclDoubleDigits_TCL_DECLARED
#define TclDoubleDigits_TCL_DECLARED
/* 249 */
EXTERN char*		TclDoubleDigits(double dv, int ndigits, int flags,
				int*decpt, int*signum, char**endPtr);
#endif

typedef struct TclIntStubs {
    int magic;
    struct TclIntStubHooks *hooks;

    VOID *reserved0;







|
|







1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
/* Slot 245 is reserved */
/* Slot 246 is reserved */
/* Slot 247 is reserved */
/* Slot 248 is reserved */
#ifndef TclDoubleDigits_TCL_DECLARED
#define TclDoubleDigits_TCL_DECLARED
/* 249 */
EXTERN char *		TclDoubleDigits(double dv, int ndigits, int flags,
				int *decpt, int *signum, char **endPtr);
#endif

typedef struct TclIntStubs {
    int magic;
    struct TclIntStubHooks *hooks;

    VOID *reserved0;
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
    int (*tclCheckExecutionTraces) (Tcl_Interp *interp, CONST char *command, int numChars, Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */
    int (*tclInThreadExit) (void); /* 172 */
    int (*tclUniCharMatch) (CONST Tcl_UniChar *string, int strLen, CONST Tcl_UniChar *pattern, int ptnLen, int flags); /* 173 */
    VOID *reserved174;
    int (*tclCallVarTraces) (Interp *iPtr, Var *arrayPtr, Var *varPtr, CONST char *part1, CONST char *part2, int flags, int leaveErrMsg); /* 175 */
    void (*tclCleanupVar) (Var *varPtr, Var *arrayPtr); /* 176 */
    void (*tclVarErrMsg) (Tcl_Interp *interp, CONST char *part1, CONST char *part2, CONST char *operation, CONST char *reason); /* 177 */
    void (*tcl_SetStartupScript) (Tcl_Obj *pathPtr, CONST char*encodingName); /* 178 */
    Tcl_Obj * (*tcl_GetStartupScript) (CONST char **encodingNamePtr); /* 179 */
    VOID *reserved180;
    VOID *reserved181;
    struct tm * (*tclpLocaltime) (CONST time_t *clock); /* 182 */
    struct tm * (*tclpGmtime) (CONST time_t *clock); /* 183 */
    VOID *reserved184;
    VOID *reserved185;







|







1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
    int (*tclCheckExecutionTraces) (Tcl_Interp *interp, CONST char *command, int numChars, Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */
    int (*tclInThreadExit) (void); /* 172 */
    int (*tclUniCharMatch) (CONST Tcl_UniChar *string, int strLen, CONST Tcl_UniChar *pattern, int ptnLen, int flags); /* 173 */
    VOID *reserved174;
    int (*tclCallVarTraces) (Interp *iPtr, Var *arrayPtr, Var *varPtr, CONST char *part1, CONST char *part2, int flags, int leaveErrMsg); /* 175 */
    void (*tclCleanupVar) (Var *varPtr, Var *arrayPtr); /* 176 */
    void (*tclVarErrMsg) (Tcl_Interp *interp, CONST char *part1, CONST char *part2, CONST char *operation, CONST char *reason); /* 177 */
    void (*tcl_SetStartupScript) (Tcl_Obj *pathPtr, CONST char *encodingName); /* 178 */
    Tcl_Obj * (*tcl_GetStartupScript) (CONST char **encodingNamePtr); /* 179 */
    VOID *reserved180;
    VOID *reserved181;
    struct tm * (*tclpLocaltime) (CONST time_t *clock); /* 182 */
    struct tm * (*tclpGmtime) (CONST time_t *clock); /* 183 */
    VOID *reserved184;
    VOID *reserved185;
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
    VOID *reserved242;
    void (*tclDbDumpActiveObjects) (FILE *outFile); /* 243 */
    VOID *reserved244;
    VOID *reserved245;
    VOID *reserved246;
    VOID *reserved247;
    VOID *reserved248;
    char* (*tclDoubleDigits) (double dv, int ndigits, int flags, int*decpt, int*signum, char**endPtr); /* 249 */
} TclIntStubs;

#ifdef __cplusplus
extern "C" {
#endif
extern TclIntStubs *tclIntStubsPtr;
#ifdef __cplusplus







|







1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
    VOID *reserved242;
    void (*tclDbDumpActiveObjects) (FILE *outFile); /* 243 */
    VOID *reserved244;
    VOID *reserved245;
    VOID *reserved246;
    VOID *reserved247;
    VOID *reserved248;
    char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */
} TclIntStubs;

#ifdef __cplusplus
extern "C" {
#endif
extern TclIntStubs *tclIntStubsPtr;
#ifdef __cplusplus

Changes to generic/tclPathObj.c.

2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
    Tcl_Interp *interp,		/* Used for error reporting if not NULL. */
    Tcl_Obj *pathPtr)		/* The object to convert. */
{
    int len;
    FsPath *fsPathPtr;
    Tcl_Obj *transPtr;
    char *name;
#if defined(__CYGWIN__) && defined(__WIN32__)
    int copied = 0;
#endif
    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);

    if (pathPtr->typePtr == &tclFsPathType) {
	return TCL_OK;
    }

    /*







<
<
<







2404
2405
2406
2407
2408
2409
2410



2411
2412
2413
2414
2415
2416
2417
    Tcl_Interp *interp,		/* Used for error reporting if not NULL. */
    Tcl_Obj *pathPtr)		/* The object to convert. */
{
    int len;
    FsPath *fsPathPtr;
    Tcl_Obj *transPtr;
    char *name;



    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey);

    if (pathPtr->typePtr == &tclFsPathType) {
	return TCL_OK;
    }

    /*
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
    } else {
	/* Bug 3479689: protect 0-refcount pathPth from getting freed */
	pathPtr->refCount++;
	transPtr = Tcl_FSJoinToPath(pathPtr, 0, NULL);
	pathPtr->refCount--;
    }

#if defined(__CYGWIN__) && defined(__WIN32__)
    {
	char winbuf[MAX_PATH+1];

	/*
	 * In the Cygwin world, call conv_to_win32_path in order to use the
	 * mount table to translate the file name into something Windows will
	 * understand. Take care when converting empty strings!
	 */

	name = Tcl_GetStringFromObj(transPtr, &len);
	if (len > 0) {
	    cygwin_conv_to_win32_path(name, winbuf);
	    TclWinNoBackslash(winbuf);
	    if (Tcl_IsShared(transPtr)) {
		copied = 1;
		transPtr = Tcl_DuplicateObj(transPtr);
		Tcl_IncrRefCount(transPtr);
	    }
	    Tcl_SetStringObj(transPtr, winbuf, -1);
	}
    }
#endif /* __CYGWIN__ && __WIN32__ */

    /*
     * Now we have a translated filename in 'transPtr'. This will have forward
     * slashes on Windows, and will not contain any ~user sequences.
     */

    fsPathPtr = (FsPath *) ckalloc(sizeof(FsPath));








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







2550
2551
2552
2553
2554
2555
2556
























2557
2558
2559
2560
2561
2562
2563
    } else {
	/* Bug 3479689: protect 0-refcount pathPth from getting freed */
	pathPtr->refCount++;
	transPtr = Tcl_FSJoinToPath(pathPtr, 0, NULL);
	pathPtr->refCount--;
    }

























    /*
     * Now we have a translated filename in 'transPtr'. This will have forward
     * slashes on Windows, and will not contain any ~user sequences.
     */

    fsPathPtr = (FsPath *) ckalloc(sizeof(FsPath));

2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
     * Free old representation before installing our new one.
     */

    TclFreeIntRep(pathPtr);
    SETPATHOBJ(pathPtr, fsPathPtr);
    PATHFLAGS(pathPtr) = 0;
    pathPtr->typePtr = &tclFsPathType;
#if defined(__CYGWIN__) && defined(__WIN32__)
    if (copied) {
	Tcl_DecrRefCount(transPtr);
    }
#endif

    return TCL_OK;
}

static void
FreeFsPathInternalRep(
    Tcl_Obj *pathPtr)		/* Path object with internal rep to free. */
{







<
<
<
<
<
<







2575
2576
2577
2578
2579
2580
2581






2582
2583
2584
2585
2586
2587
2588
     * Free old representation before installing our new one.
     */

    TclFreeIntRep(pathPtr);
    SETPATHOBJ(pathPtr, fsPathPtr);
    PATHFLAGS(pathPtr) = 0;
    pathPtr->typePtr = &tclFsPathType;






    return TCL_OK;
}

static void
FreeFsPathInternalRep(
    Tcl_Obj *pathPtr)		/* Path object with internal rep to free. */
{

Changes to generic/tclStubInit.c.

27
28
29
30
31
32
33

34
35
36
37
38
39
40
#undef Tcl_NewLongObj
#undef Tcl_NewObj
#undef Tcl_NewStringObj
#undef Tcl_DumpActiveMemory
#undef Tcl_ValidateAllMemory
#undef Tcl_FindHashEntry
#undef Tcl_CreateHashEntry


/*
 * Keep a record of the original Notifier procedures, created in the
 * same compilation unit as the stub tables so we can later do reliable,
 * portable comparisons to see whether a Tcl_SetNotifier() call swapped
 * new routines into the stub table.
 */







>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#undef Tcl_NewLongObj
#undef Tcl_NewObj
#undef Tcl_NewStringObj
#undef Tcl_DumpActiveMemory
#undef Tcl_ValidateAllMemory
#undef Tcl_FindHashEntry
#undef Tcl_CreateHashEntry
#undef TclSockMinimumBuffers

/*
 * Keep a record of the original Notifier procedures, created in the
 * same compilation unit as the stub tables so we can later do reliable,
 * portable comparisons to see whether a Tcl_SetNotifier() call swapped
 * new routines into the stub table.
 */
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    NULL
};

/* See bug 510001: TclSockMinimumBuffers needs plat imp */
#ifdef _WIN64
#   define TclSockMinimumBuffersOld 0
#else
#undef TclSockMinimumBuffers
int TclSockMinimumBuffersOld(sock, size)
    int sock;
    int size;
{
    return TclSockMinimumBuffers((void *) (size_t) sock, size);
}
#endif

MODULE_SCOPE TclIntStubs tclIntStubs;
MODULE_SCOPE TclIntPlatStubs tclIntPlatStubs;
MODULE_SCOPE TclPlatStubs tclPlatStubs;
MODULE_SCOPE TclStubs tclStubs;







<




|







56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
71
72
73
74
    NULL
};

/* See bug 510001: TclSockMinimumBuffers needs plat imp */
#ifdef _WIN64
#   define TclSockMinimumBuffersOld 0
#else

int TclSockMinimumBuffersOld(sock, size)
    int sock;
    int size;
{
    return TclSockMinimumBuffers(INT2PTR(sock), size);
}
#endif

MODULE_SCOPE TclIntStubs tclIntStubs;
MODULE_SCOPE TclIntPlatStubs tclIntPlatStubs;
MODULE_SCOPE TclPlatStubs tclPlatStubs;
MODULE_SCOPE TclStubs tclStubs;

Changes to generic/tclTomMath.decls.

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
declare 59 generic {
    int TclBN_s_mp_sqr(mp_int *a, mp_int *b)
}
declare 60 generic {
    int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c)
}
declare 61 {
    int TclBN_mp_init_set_int(mp_int* a, unsigned long i)
}
declare 62 {
    int TclBN_mp_set_int(mp_int* a, unsigned long i)
}
declare 63 {
    int TclBN_mp_cnt_lsb(mp_int* a)
}







|


|


|

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
declare 59 generic {
    int TclBN_s_mp_sqr(mp_int *a, mp_int *b)
}
declare 60 generic {
    int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c)
}
declare 61 {
    int TclBN_mp_init_set_int(mp_int *a, unsigned long i)
}
declare 62 {
    int TclBN_mp_set_int(mp_int *a, unsigned long i)
}
declare 63 {
    int TclBN_mp_cnt_lsb(mp_int *a)
}

Changes to generic/tclTomMathDecls.h.

451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
#define TclBN_s_mp_sub_TCL_DECLARED
/* 60 */
EXTERN int		TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c);
#endif
#ifndef TclBN_mp_init_set_int_TCL_DECLARED
#define TclBN_mp_init_set_int_TCL_DECLARED
/* 61 */
EXTERN int		TclBN_mp_init_set_int(mp_int*a, unsigned long i);
#endif
#ifndef TclBN_mp_set_int_TCL_DECLARED
#define TclBN_mp_set_int_TCL_DECLARED
/* 62 */
EXTERN int		TclBN_mp_set_int(mp_int*a, unsigned long i);
#endif
#ifndef TclBN_mp_cnt_lsb_TCL_DECLARED
#define TclBN_mp_cnt_lsb_TCL_DECLARED
/* 63 */
EXTERN int		TclBN_mp_cnt_lsb(mp_int*a);
#endif

typedef struct TclTomMathStubs {
    int magic;
    struct TclTomMathStubHooks *hooks;

    int (*tclBN_epoch) (void); /* 0 */







|




|




|







451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
#define TclBN_s_mp_sub_TCL_DECLARED
/* 60 */
EXTERN int		TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c);
#endif
#ifndef TclBN_mp_init_set_int_TCL_DECLARED
#define TclBN_mp_init_set_int_TCL_DECLARED
/* 61 */
EXTERN int		TclBN_mp_init_set_int(mp_int *a, unsigned long i);
#endif
#ifndef TclBN_mp_set_int_TCL_DECLARED
#define TclBN_mp_set_int_TCL_DECLARED
/* 62 */
EXTERN int		TclBN_mp_set_int(mp_int *a, unsigned long i);
#endif
#ifndef TclBN_mp_cnt_lsb_TCL_DECLARED
#define TclBN_mp_cnt_lsb_TCL_DECLARED
/* 63 */
EXTERN int		TclBN_mp_cnt_lsb(mp_int *a);
#endif

typedef struct TclTomMathStubs {
    int magic;
    struct TclTomMathStubHooks *hooks;

    int (*tclBN_epoch) (void); /* 0 */
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
    int (*tclBN_mp_karatsuba_sqr) (mp_int *a, mp_int *b); /* 54 */
    int (*tclBN_mp_toom_mul) (mp_int *a, mp_int *b, mp_int *c); /* 55 */
    int (*tclBN_mp_toom_sqr) (mp_int *a, mp_int *b); /* 56 */
    int (*tclBN_s_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 57 */
    int (*tclBN_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 58 */
    int (*tclBN_s_mp_sqr) (mp_int *a, mp_int *b); /* 59 */
    int (*tclBN_s_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 60 */
    int (*tclBN_mp_init_set_int) (mp_int*a, unsigned long i); /* 61 */
    int (*tclBN_mp_set_int) (mp_int*a, unsigned long i); /* 62 */
    int (*tclBN_mp_cnt_lsb) (mp_int*a); /* 63 */
} TclTomMathStubs;

#ifdef __cplusplus
extern "C" {
#endif
extern TclTomMathStubs *tclTomMathStubsPtr;
#ifdef __cplusplus







|
|
|







529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
    int (*tclBN_mp_karatsuba_sqr) (mp_int *a, mp_int *b); /* 54 */
    int (*tclBN_mp_toom_mul) (mp_int *a, mp_int *b, mp_int *c); /* 55 */
    int (*tclBN_mp_toom_sqr) (mp_int *a, mp_int *b); /* 56 */
    int (*tclBN_s_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 57 */
    int (*tclBN_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 58 */
    int (*tclBN_s_mp_sqr) (mp_int *a, mp_int *b); /* 59 */
    int (*tclBN_s_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 60 */
    int (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */
    int (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */
    int (*tclBN_mp_cnt_lsb) (mp_int *a); /* 63 */
} TclTomMathStubs;

#ifdef __cplusplus
extern "C" {
#endif
extern TclTomMathStubs *tclTomMathStubsPtr;
#ifdef __cplusplus