Diff
Not logged in

Differences From Artifact [37d2d3b5e8]:

To Artifact [13240187cf]:


2575
2576
2577
2578
2579
2580
2581
2582

2583
2584

2585
2586
2587
2588
2589
2590
2591

2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2575
2576
2577
2578
2579
2580
2581

2582


2583

2584
2585
2586
2587
2588

2589
2590
2591


2592
2593
2594
2595
2596
2597
2598







-
+
-
-
+
-





-
+


-
-








	Tcl_UtfToLower(Tcl_WinTCharToUtf(tbuf, -1, &ds));

    } else {
	Tcl_DStringInit(&ds);
	if (TclpHasSockets(NULL) == TCL_OK) {
	    /*
	     * Buffer length of 255 copied slavishly from previous version of
	     * The buffer size of 256 is recommended by the MSDN page that
	     * this routine. Presumably there's a more "correct" macro value
	     * for a properly sized buffer for a gethostname() call.
	     * documents gethostname() as being always adequate.
	     * Maintainers are welcome to supply it.
	     */

	    Tcl_DString inDs;

	    Tcl_DStringInit(&inDs);
	    Tcl_DStringSetLength(&inDs, 255);
	    Tcl_DStringSetLength(&inDs, 256);
	    if (gethostname(Tcl_DStringValue(&inDs),
		    Tcl_DStringLength(&inDs)) == 0) {
		TclDStringClear(&ds);
	    } else {
		Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&inDs), -1,
			&ds);
	    }
	    Tcl_DStringFree(&inDs);
	}
    }