mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
more refinements for Cygwin build (with ppremake)
This commit is contained in:
parent
2efe23bdad
commit
20e055d41f
@ -44,11 +44,13 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(WIN32)
|
||||
#ifdef WIN32
|
||||
/* begin Win32-specific code */
|
||||
|
||||
#ifdef WIN32_VC
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
static string
|
||||
front_to_back_slash(const string &str) {
|
||||
@ -132,8 +134,13 @@ convert_pathname(const string &unix_style_pathname) {
|
||||
unix_style_pathname[2] == '/') {
|
||||
// This pathname begins with a slash and a single letter. That
|
||||
// must be the drive letter.
|
||||
|
||||
// We have to cast the result of toupper() to (char) to help some
|
||||
// compilers (e.g. Cygwin's gcc 2.95.3) happy; so that they do not
|
||||
// confuse this string constructor with one that takes two
|
||||
// iterators.
|
||||
windows_pathname =
|
||||
string(1, toupper(unix_style_pathname[1])) + ":" +
|
||||
string(1, (char)toupper(unix_style_pathname[1])) + ":" +
|
||||
front_to_back_slash(unix_style_pathname.substr(2));
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user