1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
|
/*
* tclUnixFile.c --
*
* This file contains wrappers around UNIX file handling functions.
* These wrappers mask differences between Windows and UNIX.
*
* Copyright (c) 1995-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclUnixFile.c,v 1.21 2002/06/12 09:28:58 vincentdarley Exp $
* RCS: @(#) $Id: tclUnixFile.c,v 1.22 2002/06/12 15:05:20 dkf Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
static int NativeMatchType(CONST char* nativeName, Tcl_GlobTypeData *types);
|
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
|
+
+
-
+
|
#ifdef S_IFLNK
Tcl_Obj*
TclpObjLink(pathPtr, toPtr)
Tcl_Obj *pathPtr;
Tcl_Obj *toPtr;
{
extern Tcl_Filesystem nativeFilesystem;
if (toPtr != NULL) {
CONST char *src = Tcl_FSGetNativePath(pathPtr);
CONST char *target Tcl_FSGetNativePath(toPtr);
CONST char *target = Tcl_FSGetNativePath(toPtr);
if (src == NULL || target == NULL) {
return NULL;
}
if (symlink(src, target) != 0) {
return NULL;
} else {
|