Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2009-09-06 17:20:05 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2009-09-06 17:20:05 +0400
commitfb649d5824ccccca544c905209ba64340dc1bded (patch)
treeac9894e159f91ffe65c41612779711fbc3525cac /source/blender/blenlib/BLI_winstuff.h
parent51aa207d200d2cef1cdc7f4e90a6a0f7a4b31c8e (diff)
* cleaning up warnings (mostly windows). A collection of other warning fixes too (undefined function, assuming int, etc.)
This compiled fine with scons/msvc and scons/mingw (gcc 4.4.0). Please test and report any problems.
Diffstat (limited to 'source/blender/blenlib/BLI_winstuff.h')
-rw-r--r--source/blender/blenlib/BLI_winstuff.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index fad45f1b6c3..b46ebebacd5 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -65,24 +65,7 @@
extern "C" {
#endif
-# ifndef _WIN64
- #ifndef M_PI
- #define M_PI 3.14159265358979323846
- #endif
- #ifndef M_PI_2
- #define M_PI_2 1.57079632679489661923
- #endif
- #ifndef M_SQRT2
- #define M_SQRT2 1.41421356237309504880
- #endif
- #ifndef M_SQRT1_2
- #define M_SQRT1_2 0.70710678118654752440
- #endif
- #ifndef M_1_PI
- #define M_1_PI 0.318309886183790671538
- #endif
-#endif
-
+#define _USE_MATH_DEFINES
#define MAXPATHLEN MAX_PATH
#ifndef S_ISREG
@@ -92,6 +75,18 @@ extern "C" {
#define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR)
#endif
+/* defines for using ISO C++ conformant names */
+#define open _open
+#define close _close
+#define write _write
+#define read _read
+#define getcwd _getcwd
+#define chdir _chdir
+#define strdup _strdup
+#define lseek _lseek
+#define getpid _getpid
+#define snprintf _snprintf
+
#ifndef FREE_WINDOWS
typedef unsigned int mode_t;
#endif