diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-28 15:13:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-28 15:13:31 (GMT) |
commit | 2c7d6403e8bf45a9d610dd24471c79ffc0efb10f (patch) | |
tree | 991d5c45b647447f7bc568717d77835ef9fd559d /macosx/tclMacOSXFCmd.c | |
parent | 06f1954e8d128d267854ef360ea341f849ca43cf (diff) | |
download | tcl-2c7d6403e8bf45a9d610dd24471c79ffc0efb10f.zip tcl-2c7d6403e8bf45a9d610dd24471c79ffc0efb10f.tar.gz tcl-2c7d6403e8bf45a9d610dd24471c79ffc0efb10f.tar.bz2 |
MacOSX: add some type-casts, improving C++ compatibility. Make sure that strstr and strtoul() are not configured as invalid: Mac is more strict in exact function signatures. Backported from 8.7
Diffstat (limited to 'macosx/tclMacOSXFCmd.c')
-rw-r--r-- | macosx/tclMacOSXFCmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index f34b280..e462e5e 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -106,7 +106,7 @@ typedef struct finderinfo { u_int32_t extendedFileInfo[4]; } __attribute__ ((__packed__)) finderinfo; -typedef struct fileinfobuf { +typedef struct { u_int32_t info_length; u_int32_t data[8]; } fileinfobuf; @@ -172,7 +172,7 @@ TclMacOSXGetFileAttribute( } else { alist.commonattr = ATTR_CMN_FNDRINFO; } - native = Tcl_FSGetNativePath(fileName); + native = (const char *)Tcl_FSGetNativePath(fileName); result = getattrlist(native, &alist, &finfo, sizeof(fileinfobuf), 0); if (result != 0) { @@ -268,7 +268,7 @@ TclMacOSXSetFileAttribute( } else { alist.commonattr = ATTR_CMN_FNDRINFO; } - native = Tcl_FSGetNativePath(fileName); + native = (const char *)Tcl_FSGetNativePath(fileName); result = getattrlist(native, &alist, &finfo, sizeof(fileinfobuf), 0); if (result != 0) { @@ -347,7 +347,7 @@ TclMacOSXSetFileAttribute( Tcl_DStringAppend(&ds, native, -1); Tcl_DStringAppend(&ds, _PATH_RSRCFORKSPEC, -1); - result = truncate(Tcl_DStringValue(&ds), (off_t)0); + result = truncate(Tcl_DStringValue(&ds), 0); if (result != 0) { /* * truncate() on a valid resource fork path may fail with a |