Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Util windows #11

Merged
merged 4 commits into from Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/gwion_util.h
Expand Up @@ -3,6 +3,11 @@
*/
#ifndef __GWION_UTIL
#define __GWION_UTIL

#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__WIN32))
#define BUILD_ON_WINDOWS
#endif

#include "defs.h"
#include "gwion_thread.h"
#include "err_msg.h"
Expand Down
6 changes: 5 additions & 1 deletion scripts/generate_header.c
Expand Up @@ -4,10 +4,10 @@
#include <string.h>
#include <inttypes.h>


#ifdef BUILD_ON_WINDOWS
#define NUSED
#include "windows_missing.h"
#define __USE_MINGW_ANSI_STDIO 1
#ifdef __MINGW64__
#define SIZET_FMT "%tu"
#else
Expand All @@ -17,6 +17,10 @@
#define SIZET_FMT "%zu"
#endif

#ifndef __USE_MINGW_ANSI_STDIO
#define __USE_MINGW_ANSI_STDIO 1
#endif

#ifdef USE_DOUBLE
static const char* type = "double";
#define SZ sizeof(double)
Expand Down