diff options
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_system.h (renamed from source/blender/blenlib/BLI_cpu.h) | 13 | ||||
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/system.c (renamed from source/blender/blenlib/intern/cpu.c) | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 5 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 5 | ||||
-rw-r--r-- | source/blender/render/intern/source/rayshade.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 5 | ||||
-rw-r--r-- | source/creator/creator.c | 9 |
9 files changed, 25 insertions, 28 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 20107aa41a8..7458b4a4fa0 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -51,6 +51,8 @@ #include "BLI_threads.h" #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLI_system.h" +#include BLI_SYSTEM_PID_H #include "BLF_translation.h" @@ -100,9 +102,7 @@ /* untitled blend's need getpid for a unique name */ #ifndef WIN32 # include <dirent.h> -# include <unistd.h> #else -# include <process.h> # include "BLI_winstuff.h" #endif diff --git a/source/blender/blenlib/BLI_cpu.h b/source/blender/blenlib/BLI_system.h index fa29162e59e..8cdc9e4e6c5 100644 --- a/source/blender/blenlib/BLI_cpu.h +++ b/source/blender/blenlib/BLI_system.h @@ -18,14 +18,21 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef __BLI_CPU_H__ -#define __BLI_CPU_H__ +#ifndef __BLI_SYSTEM_H__ +#define __BLI_SYSTEM_H__ -/** \file BLI_cpu.h +/** \file BLI_system.h * \ingroup bli */ int BLI_cpu_support_sse2(void); +/* getpid */ +#ifdef WIN32 +# define BLI_SYSTEM_PID_H <process.h> +#else +# define BLI_SYSTEM_PID_H <unistd.h> #endif +#endif /* __BLI_SYSTEM_H__ */ + diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 491f988642b..205935f3d14 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -55,7 +55,6 @@ set(SRC intern/buffer.c intern/callbacks.c intern/convexhull2d.c - intern/cpu.c intern/dynlib.c intern/easing.c intern/edgehash.c @@ -97,6 +96,7 @@ set(SRC intern/string.c intern/string_cursor_utf8.c intern/string_utf8.c + intern/system.c intern/task.c intern/threads.c intern/time.c @@ -117,7 +117,6 @@ set(SRC BLI_callbacks.h BLI_compiler_attrs.h BLI_convexhull2d.h - BLI_cpu.h BLI_dlrbTree.h BLI_dynlib.h BLI_dynstr.h @@ -168,6 +167,7 @@ set(SRC BLI_string_cursor_utf8.h BLI_string_utf8.h BLI_sys_types.h + BLI_system.h BLI_task.h BLI_threads.h BLI_timecode.h diff --git a/source/blender/blenlib/intern/cpu.c b/source/blender/blenlib/intern/system.c index 784b1900785..e6389bc68f3 100644 --- a/source/blender/blenlib/intern/cpu.c +++ b/source/blender/blenlib/intern/system.c @@ -4,7 +4,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,12 +18,12 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/blenlib/intern/cpu.c +/** \file blender/blenlib/intern/system.c * \ingroup bli */ -#include "BLI_cpu.h" +#include "BLI_system.h" int BLI_cpu_support_sse2(void) { diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index ffd1d6d1be1..6c4fac60646 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -81,12 +81,9 @@ #include "zlib.h" -#ifndef WIN32 -# include <unistd.h> -#else +#ifdef WIN32 # include "winsock2.h" # include <io.h> -# include <process.h> // for getpid # include "BLI_winstuff.h" #endif diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 18268043a04..843134a4289 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -39,6 +39,8 @@ #include "BLI_path_util.h" #include "BLI_fileops.h" #include "BLI_md5.h" +#include "BLI_system.h" +#include BLI_SYSTEM_PID_H #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -59,12 +61,9 @@ # endif # include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff * because 'near' is disabled through BLI_windstuff */ -# include <process.h> /* getpid */ # include <direct.h> /* chdir */ # include "BLI_winstuff.h" # include "utfconv.h" -#else -# include <unistd.h> #endif #define URI_MAX (FILE_MAX * 3 + 8) diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 60327c7db8d..7e6fd04c3f4 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -41,7 +41,7 @@ #include "DNA_lamp_types.h" #include "BLI_blenlib.h" -#include "BLI_cpu.h" +#include "BLI_system.h" #include "BLI_math.h" #include "BLI_rand.h" #include "BLI_utildefines.h" diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 952fb42d607..850e4e13b75 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -46,10 +46,7 @@ # endif # include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff * because 'near' is disabled through BLI_windstuff */ -# include <process.h> /* getpid */ # include "BLI_winstuff.h" -#else -# include <unistd.h> /* getpid */ #endif #include "MEM_guardedalloc.h" @@ -60,6 +57,8 @@ #include "BLI_utildefines.h" #include "BLI_threads.h" #include "BLI_callbacks.h" +#include "BLI_system.h" +#include BLI_SYSTEM_PID_H #include "BLF_translation.h" diff --git a/source/creator/creator.c b/source/creator/creator.c index b74c64fa6b8..de320386bf8 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -40,13 +40,6 @@ # include <xmmintrin.h> #endif -/* crash handler */ -#ifdef WIN32 -# include <process.h> /* getpid */ -#else -# include <unistd.h> /* getpid */ -#endif - #ifdef WIN32 # include <windows.h> # include "utfconv.h" @@ -79,6 +72,8 @@ #include "BLI_callbacks.h" #include "BLI_blenlib.h" #include "BLI_mempool.h" +#include "BLI_system.h" +#include BLI_SYSTEM_PID_H #include "DNA_ID.h" #include "DNA_scene_types.h" |