Tcl Source Code

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

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

Overview
Comment:Unbreak build with other CFLAGS, such as TCL_MEM_DEBUG=1 or TCL_THREADS=0 on Linux
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256:d54dcf0b008c0d00a2eae0a62f997efc4f98d82ed852b949b7c16b1910a1d213
User & Date: jan.nijtmans 2018-05-23 19:31:15
Context
2018-05-25
06:51
merge 8.6 check-in: aea631bbfa user: jan.nijtmans tags: core-8-branch
2018-05-24
13:27
merge 8.7 check-in: 95e6ece457 user: dgp tags: core_zip_vfs
13:26
merge 8.7 check-in: f5804bbb27 user: dgp tags: tip-469
13:12
merge 8.7 check-in: 976f84344e user: dgp tags: tip-465
13:12
merge 8.7 check-in: 6db9f4afa6 user: dgp tags: tip-312
13:04
merge 8.7 check-in: 5e69d0de71 user: dgp tags: tip-505
13:04
merge 8.7 check-in: aae85a444a user: dgp tags: dgp-string-insert
12:46
merge 8.7 check-in: 620705ca16 user: dgp tags: tip-445
12:24
merge 8.7 check-in: 4ed7fe60d8 user: dgp tags: tip-502
2018-05-23
19:31
merge 8.7 check-in: 91ca7d60f7 user: jan.nijtmans tags: trunk
19:31
Unbreak build with other CFLAGS, such as TCL_MEM_DEBUG=1 or TCL_THREADS=0 on Linux check-in: d54dcf0b00 user: jan.nijtmans tags: core-8-branch
13:34
unbreak the build check-in: 3192cb4bf1 user: dgp tags: core-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclInt.h.

132
133
134
135
136
137
138




















139
140
141
142
143
144
145
....
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
#   endif
#endif

#if defined(_WIN32) && defined(_MSC_VER)
#   define vsnprintf _vsnprintf
#endif





















/*
 * The following procedures allow namespaces to be customized to support
 * special name resolution rules for commands/variables.
 */

struct Tcl_ResolvedVarInfo;

................................................................................
	    TclFreeObjStorage(objPtr); \
	    TclIncrObjsFreed(); \
	} else { \
	    TclFreeObj(objPtr); \
	} \
    }

#if !defined(TCL_THREADS)
#   define TCL_THREADS 1
#endif
#if TCL_THREADS && !defined(USE_THREAD_ALLOC)
#   define USE_THREAD_ALLOC 1
#endif

#if defined(PURIFY)

/*







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







<
<
<







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
....
4216
4217
4218
4219
4220
4221
4222



4223
4224
4225
4226
4227
4228
4229
#   endif
#endif

#if defined(_WIN32) && defined(_MSC_VER)
#   define vsnprintf _vsnprintf
#endif

#if !defined(TCL_THREADS)
#   define TCL_THREADS 1
#endif
#if !TCL_THREADS
#   undef TCL_DECLARE_MUTEX
#   define TCL_DECLARE_MUTEX(name)
#   undef  Tcl_MutexLock
#   define Tcl_MutexLock(mutexPtr)
#   undef  Tcl_MutexUnlock
#   define Tcl_MutexUnlock(mutexPtr)
#   undef  Tcl_MutexFinalize
#   define Tcl_MutexFinalize(mutexPtr)
#   undef  Tcl_ConditionNotify
#   define Tcl_ConditionNotify(condPtr)
#   undef  Tcl_ConditionWait
#   define Tcl_ConditionWait(condPtr, mutexPtr, timePtr)
#   undef  Tcl_ConditionFinalize
#   define Tcl_ConditionFinalize(condPtr)
#endif

/*
 * The following procedures allow namespaces to be customized to support
 * special name resolution rules for commands/variables.
 */

struct Tcl_ResolvedVarInfo;

................................................................................
	    TclFreeObjStorage(objPtr); \
	    TclIncrObjsFreed(); \
	} else { \
	    TclFreeObj(objPtr); \
	} \
    }




#if TCL_THREADS && !defined(USE_THREAD_ALLOC)
#   define USE_THREAD_ALLOC 1
#endif

#if defined(PURIFY)

/*

Changes to generic/tclThread.c.

250
251
252
253
254
255
256

257
258
259
260
261
262
263
...
303
304
305
306
307
308
309

310
311
312
313
314
315
316
...
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
 *
 * Side effects:
 *	Remove the mutex from the list.
 *
 *----------------------------------------------------------------------
 */


void
Tcl_MutexFinalize(
    Tcl_Mutex *mutexPtr)
{
#if TCL_THREADS
    TclpFinalizeMutex(mutexPtr);
#endif
................................................................................
 *
 * Side effects:
 *	Remove the condition variable from the list.
 *
 *----------------------------------------------------------------------
 */


void
Tcl_ConditionFinalize(
    Tcl_Condition *condPtr)
{
#if TCL_THREADS
    TclpFinalizeCondition(condPtr);
#endif
................................................................................
 */

void
Tcl_ExitThread(
    int status)
{
    Tcl_FinalizeThread();
#if TCL_THREADS
    TclpThreadExit(status);
#endif
}

#if !TCL_THREADS
 
/*
 *----------------------------------------------------------------------
 *







>







 







>







 







<

<







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
...
456
457
458
459
460
461
462

463

464
465
466
467
468
469
470
 *
 * Side effects:
 *	Remove the mutex from the list.
 *
 *----------------------------------------------------------------------
 */

#undef Tcl_MutexFinalize
void
Tcl_MutexFinalize(
    Tcl_Mutex *mutexPtr)
{
#if TCL_THREADS
    TclpFinalizeMutex(mutexPtr);
#endif
................................................................................
 *
 * Side effects:
 *	Remove the condition variable from the list.
 *
 *----------------------------------------------------------------------
 */

#undef Tcl_ConditionFinalize
void
Tcl_ConditionFinalize(
    Tcl_Condition *condPtr)
{
#if TCL_THREADS
    TclpFinalizeCondition(condPtr);
#endif
................................................................................
 */

void
Tcl_ExitThread(
    int status)
{
    Tcl_FinalizeThread();

    TclpThreadExit(status);

}

#if !TCL_THREADS
 
/*
 *----------------------------------------------------------------------
 *

Changes to unix/tclUnixThrd.c.

162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
...
183
184
185
186
187
188
189

190
191


192

193
194
195
196
197
198
199
    }
    return (result == 0) ? TCL_OK : TCL_ERROR;
#else
    return TCL_ERROR;
#endif
}
 
#if TCL_THREADS
/*
 *----------------------------------------------------------------------
 *
 * TclpThreadExit --
 *
 *	This procedure terminates the current thread.
 *
................................................................................
 *----------------------------------------------------------------------
 */

void
TclpThreadExit(
    int status)
{

    pthread_exit(INT2PTR(status));
}


#endif /* TCL_THREADS */

 
/*
 *----------------------------------------------------------------------
 *
 * Tcl_GetCurrentThread --
 *
 *	This procedure returns the ID of the currently running thread.







<







 







>

<
>
>

>







162
163
164
165
166
167
168

169
170
171
172
173
174
175
...
182
183
184
185
186
187
188
189
190

191
192
193
194
195
196
197
198
199
200
201
    }
    return (result == 0) ? TCL_OK : TCL_ERROR;
#else
    return TCL_ERROR;
#endif
}
 

/*
 *----------------------------------------------------------------------
 *
 * TclpThreadExit --
 *
 *	This procedure terminates the current thread.
 *
................................................................................
 *----------------------------------------------------------------------
 */

void
TclpThreadExit(
    int status)
{
#if TCL_THREADS
    pthread_exit(INT2PTR(status));

#else /* TCL_THREADS */
    exit(status);
#endif /* TCL_THREADS */
}
 
/*
 *----------------------------------------------------------------------
 *
 * Tcl_GetCurrentThread --
 *
 *	This procedure returns the ID of the currently running thread.