diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | generic/tclLoadNone.c | 33 | ||||
-rw-r--r-- | win/tclWinFile.c | 12 |
3 files changed, 58 insertions, 0 deletions
@@ -1,3 +1,16 @@ +2013-02-05 Don Porter <dgp@users.sourceforge.net> + + * win/tclWinFile.c: [Bug 3603434] Make sure TclpObjNormalizePath() + properly declares "a:/" to be normalized, even when no "A:" drive is + present on the system. + +2013-02-05 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclLoadNone.c (TclpLoadMemory): [Bug 3433012]: Added dummy + version of this function to use in the event that a platform thinks it + can load from memory but cannot actually do so due to it being + disabled at configuration time. + 2013-02-04 Donal K. Fellows <dkf@users.sf.net> * generic/tclCompCmds.c (TclCompileArraySetCmd): [Bug 3603163]: Stop diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index f030d89..5a2dc53 100644 --- a/generic/tclLoadNone.c +++ b/generic/tclLoadNone.c @@ -82,6 +82,39 @@ TclGuessPackageName( } /* + * These functions are fallbacks if we somehow determine that the platform can + * do loading from memory but the user wishes to disable it. They just report + * (gracefully) that they fail. + */ + +#ifdef TCL_LOAD_FROM_MEMORY + +MODULE_SCOPE void * +TclpLoadMemoryGetBuffer( + Tcl_Interp *interp, /* Dummy: unused by this implementation */ + int size) /* Dummy: unused by this implementation */ +{ + return NULL; +} + +MODULE_SCOPE int +TclpLoadMemory( + Tcl_Interp *interp, /* Used for error reporting. */ + void *buffer, /* Dummy: unused by this implementation */ + int size, /* Dummy: unused by this implementation */ + int codeSize, /* Dummy: unused by this implementation */ + Tcl_LoadHandle *loadHandle, /* Dummy: unused by this implementation */ + Tcl_FSUnloadFileProc **unloadProcPtr) + /* Dummy: unused by this implementation */ +{ + Tcl_SetResult(interp, "dynamic loading from memory is not available " + "on this system", TCL_STATIC); + return TCL_ERROR; +} + +#endif /* TCL_LOAD_FROM_MEMORY */ + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 42405d4..18b05d6 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -2475,6 +2475,12 @@ TclpObjNormalizePath( } Tcl_DStringAppend(&dsNorm, nativePath, len); lastValidPathEnd = currentPathEndPosition; + } else if (nextCheckpoint == 0) { + /* Path starts with a drive designation + * that's not actually on the system. + * We still must normalize up past the + * first separator. [Bug 3603434] */ + currentPathEndPosition++; } } Tcl_DStringFree(&ds); @@ -2615,6 +2621,12 @@ TclpObjNormalizePath( (const char *)nativePath, (int)(sizeof(WCHAR) * len)); lastValidPathEnd = currentPathEndPosition; + } else if (nextCheckpoint == 0) { + /* Path starts with a drive designation + * that's not actually on the system. + * We still must normalize up past the + * first separator. [Bug 3603434] */ + currentPathEndPosition++; } } Tcl_DStringFree(&ds); |