diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:46:42 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:46:42 (GMT) |
| commit | 4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f (patch) | |
| tree | d5db4ca8a1fecbd63d9e72730fad2f404367daff /unix/tclUnixInit.c | |
| parent | 63994a73e3f641451b26f48f697b6a069863751c (diff) | |
| parent | 52e543c5691a60c3ef802fecf1ae08e7efcf19b7 (diff) | |
| download | tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.zip tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.gz tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'unix/tclUnixInit.c')
| -rw-r--r-- | unix/tclUnixInit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 2aa64bf..b37d4ad 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -31,6 +31,9 @@ #endif #ifdef __CYGWIN__ +#ifdef __cplusplus +extern "C" { +#endif #ifdef __clang__ #pragma clang diagnostic ignored "-Wignored-attributes" #endif @@ -39,6 +42,9 @@ DLLIMPORT extern __stdcall void *GetModuleHandleW(const void *); DLLIMPORT extern __stdcall void FreeLibrary(void *); DLLIMPORT extern __stdcall void *GetProcAddress(void *, const char *); DLLIMPORT extern __stdcall void GetSystemInfo(void *); +#ifdef __cplusplus +} +#endif #define NUMPROCESSORS 11 static const char *const processors[NUMPROCESSORS] = { @@ -539,7 +545,7 @@ TclpInitLibraryPath( *encodingPtr = Tcl_GetEncoding(NULL, NULL); str = TclGetStringFromObj(pathPtr, lengthPtr); - *valuePtr = Tcl_Alloc(*lengthPtr + 1); + *valuePtr = (char *)Tcl_Alloc(*lengthPtr + 1); memcpy(*valuePtr, str, *lengthPtr + 1); Tcl_DecrRefCount(pathPtr); } @@ -1058,6 +1064,10 @@ MacOSXGetLibraryPath( foundInFramework = Tcl_MacOSXOpenVersionedBundleResources(interp, "com.tcltk.tcllibrary", TCL_FRAMEWORK_VERSION, 0, maxPathLen, tclLibPath); +#else + (void)interp; + (void)maxPathLen; + (void)tclLibPath; #endif return foundInFramework; |
