Attachment "tcl_endgrpwent_20080414.diff" to
ticket [1942222fff]
added by
karllim
2008-04-14 23:28:49.
--- build/tclUnixFCmd.c 2007-12-13 16:28:42.000000000 +0100
+++ unix/tclUnixFCmd.c 2008-04-14 18:24:48.000000000 +0200
@@ -1338,7 +1338,6 @@
*attributePtrPtr = Tcl_NewStringObj(utf, -1);
Tcl_DStringFree(&ds);
}
- endgrent();
return TCL_OK;
}
@@ -1393,7 +1392,6 @@
*attributePtrPtr = Tcl_NewStringObj(utf, Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
}
- endpwent();
return TCL_OK;
}
@@ -1480,7 +1478,6 @@
Tcl_DStringFree(&ds);
if (groupPtr == NULL) {
- endgrent();
if (interp != NULL) {
Tcl_AppendResult(interp, "could not set group for file \"",
TclGetString(fileName), "\": group \"", string,
@@ -1494,7 +1491,6 @@
native = Tcl_FSGetNativePath(fileName);
result = chown(native, (uid_t) -1, (gid_t) gid); /* INTL: Native. */
- endgrent();
if (result != 0) {
if (interp != NULL) {
Tcl_AppendResult(interp, "could not set group for file \"",
--- build/tclUnixFile.c 2007-12-13 16:28:42.000000000 +0100
+++ unix/tclUnixFile.c 2008-04-14 18:27:12.000000000 +0200
@@ -571,11 +571,9 @@
Tcl_DStringFree(&ds);
if (pwPtr == NULL) {
- endpwent();
return NULL;
}
Tcl_ExternalToUtfDString(NULL, pwPtr->pw_dir, -1, bufferPtr);
- endpwent();
return Tcl_DStringValue(bufferPtr);
}