mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 19:34:18 -04:00
more refinements for Cygwin build (with ppremake)
This commit is contained in:
parent
2efe23bdad
commit
20e055d41f
@ -44,11 +44,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(WIN32)
|
#ifdef WIN32
|
||||||
/* begin Win32-specific code */
|
/* begin Win32-specific code */
|
||||||
|
|
||||||
|
#ifdef WIN32_VC
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static string
|
static string
|
||||||
front_to_back_slash(const string &str) {
|
front_to_back_slash(const string &str) {
|
||||||
@ -132,8 +134,13 @@ convert_pathname(const string &unix_style_pathname) {
|
|||||||
unix_style_pathname[2] == '/') {
|
unix_style_pathname[2] == '/') {
|
||||||
// This pathname begins with a slash and a single letter. That
|
// This pathname begins with a slash and a single letter. That
|
||||||
// must be the drive letter.
|
// 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 =
|
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));
|
front_to_back_slash(unix_style_pathname.substr(2));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user