mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.c: simplify #ifdef. _WIN32 and __CYGWIN__ are exclusive.
see include/ruby/defines.h * gc.c: ditto. * ext/sdbm/_sdbm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a923a6f04c
commit
e91baf5634
4 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
|||
Sun Oct 18 10:54:52 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* dln.c: simplify #ifdef. _WIN32 and __CYGWIN__ are exclusive.
|
||||
see include/ruby/defines.h
|
||||
* gc.c: ditto.
|
||||
* ext/sdbm/_sdbm.c: ditto.
|
||||
|
||||
Sun Oct 18 10:42:19 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* ruby.c (open_load_file): add a comment.
|
||||
|
|
6
dln.c
6
dln.c
|
@ -1117,12 +1117,12 @@ dln_sym(const char *name)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <imagehlp.h>
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
#ifdef _WIN32
|
||||
static const char *
|
||||
dln_strerror(char *message, size_t size)
|
||||
{
|
||||
|
@ -1254,7 +1254,7 @@ dln_load(const char *file)
|
|||
#define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
#if defined _WIN32
|
||||
HINSTANCE handle;
|
||||
WCHAR *winfile;
|
||||
char message[1024];
|
||||
|
|
|
@ -372,7 +372,7 @@ makroom(register DBM *db, long int hash, int need)
|
|||
{
|
||||
long newp;
|
||||
char twin[PBLKSIZ];
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
#if defined _WIN32
|
||||
char zer[PBLKSIZ];
|
||||
long oldtail;
|
||||
#endif
|
||||
|
@ -399,7 +399,7 @@ makroom(register DBM *db, long int hash, int need)
|
|||
* here, as sdbm_store will do so, after it inserts the incoming pair.
|
||||
*/
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
#if defined _WIN32
|
||||
/*
|
||||
* Fill hole with 0 if made it.
|
||||
* (hole is NOT read as 0)
|
||||
|
|
4
gc.c
4
gc.c
|
@ -7419,7 +7419,7 @@ aligned_malloc(size_t alignment, size_t size)
|
|||
|
||||
#if defined __MINGW32__
|
||||
res = __mingw_aligned_malloc(size, alignment);
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
#elif defined _WIN32
|
||||
void *_aligned_malloc(size_t, size_t);
|
||||
res = _aligned_malloc(size, alignment);
|
||||
#elif defined(HAVE_POSIX_MEMALIGN)
|
||||
|
@ -7453,7 +7453,7 @@ aligned_free(void *ptr)
|
|||
{
|
||||
#if defined __MINGW32__
|
||||
__mingw_aligned_free(ptr);
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
#elif defined _WIN32
|
||||
_aligned_free(ptr);
|
||||
#elif defined(HAVE_MEMALIGN) || defined(HAVE_POSIX_MEMALIGN)
|
||||
free(ptr);
|
||||
|
|
Loading…
Reference in a new issue