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:
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c5
-rw-r--r--source/blender/blenkernel/intern/unit.c8
-rw-r--r--source/blender/blenlib/BLI_winstuff.h4
-rw-r--r--source/blender/editors/animation/anim_draw.c1
-rw-r--r--source/blender/editors/mesh/loopcut.c3
-rw-r--r--source/blender/makesrna/intern/rna_brush.c5
-rw-r--r--source/blender/makesrna/intern/rna_camera.c4
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c5
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c3
10 files changed, 17 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index d584b18aa84..b6ba07ada4a 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -29,12 +29,9 @@
#include <string.h>
#include <math.h>
-#ifdef _WIN32
-#include "BLI_winstuff.h"
-#endif
-
#include "BLI_blenlib.h"
#include "BLI_math.h"
+#include "BLI_winstuff.h"
#include "DNA_anim_types.h"
#include "DNA_action_types.h"
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index c2994e1134c..1e8896042d6 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -20,17 +20,13 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
-
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-#include <math.h>
-#if defined(WIN32) && (!(defined snprintf))
-#define snprintf _snprintf
-#endif
+#include "BLI_math.h"
+#include "BLI_winstuff.h"
#define TEMP_STR_SIZE 256
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index 77d41e2b96a..677974928a4 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -32,6 +32,8 @@
#ifndef __WINSTUFF_H__
#define __WINSTUFF_H__
+#ifdef _WIN32
+
#ifndef FREE_WINDOWS
#pragma warning(once: 4761 4305 4244 4018)
#endif
@@ -139,5 +141,7 @@ int BLI_getInstallationDir(char *str);
}
#endif
+#endif
+
#endif /* __WINSTUFF_H__ */
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 93beb819a2b..decf507ae1f 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -28,7 +28,6 @@
#include <string.h>
#include <stdio.h>
-#include <math.h>
#include "DNA_anim_types.h"
#include "DNA_action_types.h"
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c
index 089ac1a300c..906d966245f 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/loopcut.c
@@ -27,8 +27,6 @@
*/
#include <float.h>
-#define _USE_MATH_DEFINES
-#include <math.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
@@ -47,6 +45,7 @@
#include "BLI_blenlib.h"
#include "BLI_dynstr.h" /*for WM_operator_pystring */
#include "BLI_editVert.h"
+#include "BLI_math.h"
#include "BKE_blender.h"
#include "BKE_context.h"
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 06b08d677d4..f9f6f9e5020 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -21,10 +21,8 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
- #define _USE_MATH_DEFINES
#include <stdlib.h>
-#include <math.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -34,7 +32,10 @@
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
+#include "BLI_math.h"
+
#include "IMB_imbuf.h"
+
#include "WM_types.h"
#ifdef RNA_RUNTIME
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index be7feb92d31..12dc790a1e8 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -22,9 +22,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
#include <stdlib.h>
-#include <math.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -33,6 +31,8 @@
#include "DNA_camera_types.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
#ifdef RNA_RUNTIME
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 4ff89b84877..d571f5038ee 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -22,10 +22,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
- #define _USE_MATH_DEFINES
-
#include <stdlib.h>
-#include <math.h>
#include "RNA_access.h"
#include "RNA_define.h"
@@ -40,6 +37,8 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
EnumPropertyItem fmodifier_type_items[] = {
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 958832ce314..e94aab7ab89 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -26,9 +26,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
-#include <math.h>
-
#include "DNA_screen_types.h"
#include "DNA_vec_types.h"
#include "DNA_userdef_types.h"
@@ -38,6 +35,7 @@
#include "BLI_blenlib.h"
#include "BLI_editVert.h" /* lasso tessellation */
+#include "BLI_math.h"
#include "BLI_scanfill.h" /* lasso tessellation */
#include "BKE_context.h"
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 04d6a5b2325..2f2aebbc525 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -27,8 +27,6 @@
*/
#include <float.h>
-#define _USE_MATH_DEFINES
-#include <math.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
@@ -48,6 +46,7 @@
#include "BLI_blenlib.h"
#include "BLI_dynstr.h" /*for WM_operator_pystring */
+#include "BLI_math.h"
#include "BLO_readfile.h"