Tcl Source Code

Check-in [3a19fabce0]
Login

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

Overview
Comment:Use EAI_SYSTEM only if it exists.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3a19fabce0a78c18b9c7e8d9c693198fc05cae6f
User & Date: max 2012-06-26 08:05:18
Context
2012-06-26
09:41
Let Cygwin shared build link with zlib1.dll, not cygz.dll (two less dependencies on cygwin-specific ... check-in: 00e39c13a5 user: jan.nijtmans tags: trunk
08:05
Use EAI_SYSTEM only if it exists. check-in: 3a19fabce0 user: max tags: trunk
2012-06-25
16:42
3024359 Make sure that the per-thread cache of the list of file systems currently registered is only... check-in: a340fc1f8f user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2012-06-25  Don Porter  <[email protected]>

	* generic/tclFileSystem.h:	[Bug 3024359] Make sure that the
	* generic/tclIOUtil.c:	per-thread cache of the list of file systems
	* generic/tclPathObj.c:	currently registered is only updated at times
	when no active loops are traversing it.  Also reduce the amount of
	epoch storing and checking to where it can make a difference.
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-06-26  Reinhard Max  <[email protected]>

	* generic/tclIOSock.c: Use EAI_SYSTEM only if it exists.
	* unix/tclUnixSock.c:
	
2012-06-25  Don Porter  <[email protected]>

	* generic/tclFileSystem.h:	[Bug 3024359] Make sure that the
	* generic/tclIOUtil.c:	per-thread cache of the list of file systems
	* generic/tclPathObj.c:	currently registered is only updated at times
	when no active loops are traversing it.  Also reduce the amount of
	epoch storing and checking to where it can make a difference.

Changes to generic/tclIOSock.c.

202
203
204
205
206
207
208

209



210
211
212
213
214
215
216
217
218
    result = getaddrinfo(native, portstring, &hints, addrlist);

    if (host != NULL) {
	Tcl_DStringFree(&ds);
    }

    if (result != 0) {

        if (result != EAI_SYSTEM) {



            *errorMsgPtr = gai_strerror(result);
        }
        return 0;
    }

    /*
     * Put IPv4 addresses before IPv6 addresses to maximize backwards
     * compatibility of [fconfigure -sockname] output.
     *







>
|
>
>
>

<







202
203
204
205
206
207
208
209
210
211
212
213
214

215
216
217
218
219
220
221
    result = getaddrinfo(native, portstring, &hints, addrlist);

    if (host != NULL) {
	Tcl_DStringFree(&ds);
    }

    if (result != 0) {
#ifdef EAI_SYSTEM /* Doesn't exist on Windows */
        if (result == EAI_SYSTEM)
            *errorMsgPtr = Tcl_PosixError(interp);
        else
#endif
            *errorMsgPtr = gai_strerror(result);

        return 0;
    }

    /*
     * Put IPv4 addresses before IPv6 addresses to maximize backwards
     * compatibility of [fconfigure -sockname] output.
     *

Changes to unix/tclUnixSock.c.

1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
     */
    if (!TclCreateSocketAddress(interp, &addrlist, host, port, 0, &errorMsg) ||
        !TclCreateSocketAddress(interp, &myaddrlist, myaddr, myport, 1, &errorMsg)) {
        if (addrlist != NULL) {
            freeaddrinfo(addrlist);
        }
        if (interp != NULL) {
            Tcl_AppendResult(interp, "couldn't open socket: ", NULL);
            if (errorMsg == NULL) {
                Tcl_AppendResult(interp, Tcl_PosixError(interp), NULL);
            } else {
                Tcl_AppendResult(interp, errorMsg, NULL);
            }
        }
        return NULL;
    }

    /*
     * Allocate a new TcpState for this socket.
     */







|
<
<
<
<
<







1113
1114
1115
1116
1117
1118
1119
1120





1121
1122
1123
1124
1125
1126
1127
     */
    if (!TclCreateSocketAddress(interp, &addrlist, host, port, 0, &errorMsg) ||
        !TclCreateSocketAddress(interp, &myaddrlist, myaddr, myport, 1, &errorMsg)) {
        if (addrlist != NULL) {
            freeaddrinfo(addrlist);
        }
        if (interp != NULL) {
            Tcl_AppendResult(interp, "couldn't open socket: ", errorMsg, NULL);





        }
        return NULL;
    }

    /*
     * Allocate a new TcpState for this socket.
     */