Bug 63062 - Handle paths properly on Windows
Summary: Handle paths properly on Windows
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 63046
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-03 08:49 UTC by Stef Walter
Modified: 2013-04-03 13:15 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Use a semi-colon as the path separator on Windows (2.72 KB, patch)
2013-04-03 08:52 UTC, Stef Walter
Details | Splinter Review
More compatible path munging and handling code (29.76 KB, patch)
2013-04-03 10:46 UTC, Stef Walter
Details | Splinter Review

Description Stef Walter 2013-04-03 08:49:34 UTC
From LRN:

Other tests that caught my attention were tools/tests, which appeared to be crashing.

Turns out, it was an assertion failure, in each one of them (by the way, calling abort() on W32 is not a good idea; it's better to call DebugBreak(), then ExitProcess ()).

Apparently, they are all trying to mkdtemp ("/tmp/..."), which obviously fails, since W32 doesn't support POSIX paths.
Comment 1 Stef Walter 2013-04-03 08:52:05 UTC
Created attachment 77367 [details] [review]
Use a semi-colon as the path separator on Windows
Comment 2 Stef Walter 2013-04-03 08:53:11 UTC
LRN, I've your PATH separator patch from bug 63046. I just changed the line that says '#ifdef OS_WIN32'.

Could you test it?
Comment 3 LRN 2013-04-03 10:43:43 UTC
Compiles, passes the tests (i replaced my patch with your version).

And why wouldn't it? In configure.ac you define OS_WIN32 based on host triplet *-*-mingw*. Only mingw has that triplet (cygwin is "*-*-cygwin, i think), so effect is the same.
Comment 4 Stef Walter 2013-04-03 10:46:01 UTC
Created attachment 77374 [details] [review]
More compatible path munging and handling code
Comment 5 Stef Walter 2013-04-03 10:47:37 UTC
Thanks for testing that. I've folded it into a far bigger patch which moves all the path munging code into a central location, so we can test it for sanity.

Could you review and test the attached (much bigger) patch?
Comment 6 LRN 2013-04-03 11:08:06 UTC
Complies, passes all tests.
Comment 7 Stef Walter 2013-04-03 13:15:35 UTC
Attachment 77374 [details] pushed as a63311a - More compatible path munging and handling code


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.