Attachment "748946.patch" to
ticket [748946ffff]
added by
das
2003-06-11 16:15:12.
Index: unix/tclUnixFCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixFCmd.c,v
retrieving revision 1.29
diff -u -r1.29 tclUnixFCmd.c
--- unix/tclUnixFCmd.c 14 May 2003 19:21:30 -0000 1.29
+++ unix/tclUnixFCmd.c 11 Jun 2003 09:07:19 -0000
@@ -91,7 +91,7 @@
static int GetModeFromPermString _ANSI_ARGS_((
Tcl_Interp *interp, char *modeStringPtr,
mode_t *modePtr));
-#ifdef HAVE_CHFLAGS
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
static int GetReadOnlyAttribute _ANSI_ARGS_((Tcl_Interp *interp,
int objIndex, Tcl_Obj *fileName,
Tcl_Obj **attributePtrPtr));
@@ -116,7 +116,7 @@
UNIX_GROUP_ATTRIBUTE,
UNIX_OWNER_ATTRIBUTE,
UNIX_PERMISSIONS_ATTRIBUTE,
-#ifdef HAVE_CHFLAGS
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
UNIX_READONLY_ATTRIBUTE,
#endif
#ifdef MAC_OSX_TCL
@@ -131,7 +131,7 @@
"-group",
"-owner",
"-permissions",
-#ifdef HAVE_CHFLAGS
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
"-readonly",
#endif
#ifdef MAC_OSX_TCL
@@ -147,7 +147,7 @@
{GetGroupAttribute, SetGroupAttribute},
{GetOwnerAttribute, SetOwnerAttribute},
{GetPermissionsAttribute, SetPermissionsAttribute},
-#ifdef HAVE_CHFLAGS
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
{GetReadOnlyAttribute, SetReadOnlyAttribute},
#endif
#ifdef MAC_OSX_TCL
@@ -1819,7 +1819,7 @@
return nextCheckpoint;
}
-#ifdef HAVE_CHFLAGS
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
/*
*----------------------------------------------------------------------
*
@@ -1919,4 +1919,4 @@
}
return TCL_OK;
}
-#endif /* HAVE_CHFLAGS */
+#endif /* defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) */