diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-01-13 15:50:02 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-01-13 15:50:02 +0100 |
commit | 4f435bddfd44d40999f88685c61cc04e319d8d6c (patch) | |
tree | f9d0655a0d901b87f918a736741144b502cba3f6 /include/my_global.h | |
parent | 8c2bcdf85ff753bceeb5b235f3605e348e6f9e1d (diff) | |
parent | 6ca4ca7d37fed3b3da18666768de6a2f8c34bc7b (diff) | |
download | mariadb-git-4f435bddfd44d40999f88685c61cc04e319d8d6c.tar.gz |
5.3 merge
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/include/my_global.h b/include/my_global.h index 451cb9127a3..8d54448f477 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2001, 2011, Oracle and/or its affiliates. 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 @@ -45,6 +45,8 @@ #undef __WIN__ #undef __WIN32__ #define HAVE_ERRNO_AS_DEFINE +#define _POSIX_MONOTONIC_CLOCK +#define _POSIX_THREAD_CPUTIME #endif /* __CYGWIN__ */ /* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ @@ -1386,21 +1388,10 @@ do { doubleget_union _tmp; \ #define NO_EMBEDDED_ACCESS_CHECKS #endif -#if defined(_WIN32) +#ifdef _WIN32 #define dlsym(lib, name) (void*)GetProcAddress((HMODULE)lib, name) #define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) #define dlclose(lib) FreeLibrary((HMODULE)lib) -#ifndef HAVE_DLOPEN -#define HAVE_DLOPEN -#endif -#endif - -#if defined(HAVE_DLFCN_H) -#include <dlfcn.h> -#endif - -#ifndef HAVE_DLERROR -#ifdef _WIN32 static inline char *dlerror(void) { static char win_errormsg[2048]; @@ -1409,9 +1400,23 @@ static inline char *dlerror(void) return win_errormsg; return ""; } +#define HAVE_DLOPEN 1 +#define HAVE_DLERROR 1 +#endif + +#ifdef HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#ifdef HAVE_DLOPEN +#ifndef HAVE_DLERROR +#define dlerror() "" +#endif #else #define dlerror() "No support for dynamic loading (static build?)" -#endif +#define dlopen(A,B) 0 +#define dlsym(A,B) 0 +#define dlclose(A) 0 #endif /* |