diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2018-08-15 21:50:59 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2018-08-15 21:50:59 +0000 |
commit | 175f9fdb1a0851f958dc57488c5ecacd2f6811f4 (patch) | |
tree | 1dfc6bd3362f411364fd8993ddd0738c6f69e70e /lib/sg_lib.c | |
parent | a059c857494382bb900dc23474b31c654017e461 (diff) | |
download | sg3_utils-175f9fdb1a0851f958dc57488c5ecacd2f6811f4.tar.gz |
turn off format checking for MinGW; more manpage clean-up
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@787 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_lib.c')
-rw-r--r-- | lib/sg_lib.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sg_lib.c b/lib/sg_lib.c index e23dfc6d..092de1a1 100644 --- a/lib/sg_lib.c +++ b/lib/sg_lib.c @@ -28,13 +28,14 @@ */ #define _POSIX_C_SOURCE 200809L /* for posix_memalign() */ -#define __STDC_FORMAT_MACROS 1 #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <stdbool.h> +#include <stdint.h> #include <string.h> #include <ctype.h> +#define __STDC_FORMAT_MACROS 1 #include <inttypes.h> #include <errno.h> #include <unistd.h> @@ -3351,9 +3352,6 @@ pr2serr(const char * fmt, ...) #include <sys/param.h> #elif defined(SG_LIB_WIN32) #include <windows.h> - -static bool got_page_size = false; -static uint32_t win_page_size; #endif uint32_t @@ -3362,6 +3360,9 @@ sg_get_page_size(void) #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) return sysconf(_SC_PAGESIZE); /* POSIX.1 (was getpagesize()) */ #elif defined(SG_LIB_WIN32) + static bool got_page_size = false; + static uint32_t win_page_size; + if (! got_page_size) { SYSTEM_INFO si; |