diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-28 13:32:37 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-28 13:32:37 (GMT) |
commit | 47e821e8297b9b9d7bb295a11f35c0307f2c1a7a (patch) | |
tree | 968af4744acfc6496b9611741040c3da171cb682 /win/tclWinFile.c | |
parent | 6540c1e7abc493b3684a2b1312717329494b96b1 (diff) | |
parent | 1251bcbcc6272da5c31c077c03ce238cfde19844 (diff) | |
download | tcl-47e821e8297b9b9d7bb295a11f35c0307f2c1a7a.zip tcl-47e821e8297b9b9d7bb295a11f35c0307f2c1a7a.tar.gz tcl-47e821e8297b9b9d7bb295a11f35c0307f2c1a7a.tar.bz2 |
merge trunk
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 66 |
1 files changed, 2 insertions, 64 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 331d65a..dcc05bb 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1588,9 +1588,9 @@ NativeAccess( { SECURITY_DESCRIPTOR *sdPtr = NULL; unsigned long size; - SID *pSid = 0; + PSID pSid = 0; BOOL SidDefaulted; - SID_IDENTIFIER_AUTHORITY samba_unmapped = { 0, 0, 0, 0, 0, 22 }; + SID_IDENTIFIER_AUTHORITY samba_unmapped = {{0, 0, 0, 0, 0, 22}}; GENERIC_MAPPING genMap; HANDLE hToken = NULL; DWORD desiredAccess = 0, grantedAccess = 0; @@ -1809,27 +1809,10 @@ TclpObjChdir( { int result; const TCHAR *nativePath; -#ifdef __CYGWIN__ - extern int cygwin_conv_to_posix_path(const char *, char *); - char posixPath[MAX_PATH+1]; - const char *path; - Tcl_DString ds; -#endif /* __CYGWIN__ */ nativePath = Tcl_FSGetNativePath(pathPtr); -#ifdef __CYGWIN__ - /* - * Cygwin chdir only groks POSIX path. - */ - - path = Tcl_WinTCharToUtf(nativePath, -1, &ds); - cygwin_conv_to_posix_path(path, posixPath); - result = (chdir(posixPath) == 0 ? 1 : 0); - Tcl_DStringFree(&ds); -#else /* __CYGWIN__ */ result = SetCurrentDirectory(nativePath); -#endif /* __CYGWIN__ */ if (result == 0) { TclWinConvertError(GetLastError()); @@ -1838,51 +1821,6 @@ TclpObjChdir( return 0; } -#ifdef __CYGWIN__ -/* - *--------------------------------------------------------------------------- - * - * TclpReadlink -- - * - * This function replaces the library version of readlink(). - * - * Results: - * The result is a pointer to a string specifying the contents of the - * symbolic link given by 'path', or NULL if the symbolic link could not - * be read. Storage for the result string is allocated in bufferPtr; the - * caller must call Tcl_DStringFree() when the result is no longer - * needed. - * - * Side effects: - * See readlink() documentation. - * - *--------------------------------------------------------------------------- - */ - -char * -TclpReadlink( - const char *path, /* Path of file to readlink (UTF-8). */ - Tcl_DString *linkPtr) /* Uninitialized or free DString filled with - * contents of link (UTF-8). */ -{ - char link[MAXPATHLEN]; - int length; - char *native; - Tcl_DString ds; - - native = Tcl_UtfToExternalDString(NULL, path, -1, &ds); - length = readlink(native, link, sizeof(link)); /* INTL: Native. */ - Tcl_DStringFree(&ds); - - if (length < 0) { - return NULL; - } - - Tcl_ExternalToUtfDString(NULL, link, length, linkPtr); - return Tcl_DStringValue(linkPtr); -} -#endif /* __CYGWIN__ */ - /* *---------------------------------------------------------------------- * |