ruby-changes:40086
From: kosaki <ko1@a...>
Date: Sun, 18 Oct 2015 11:09:05 +0900 (JST)
Subject: [ruby-changes:40086] kosaki:r52167 (trunk): * dln.c: simplify #ifdef. _WIN32 and __CYGWIN__ are exclusive.
kosaki 2015-10-18 11:08:56 +0900 (Sun, 18 Oct 2015) New Revision: 52167 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52167 Log: * dln.c: simplify #ifdef. _WIN32 and __CYGWIN__ are exclusive. see include/ruby/defines.h * gc.c: ditto. * ext/sdbm/_sdbm.c: ditto. Modified files: trunk/ChangeLog trunk/dln.c trunk/ext/sdbm/_sdbm.c trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52166) +++ ChangeLog (revision 52167) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Oct 18 10:54:52 2015 KOSAKI Motohiro <kosaki.motohiro@g...> + + * 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@g...> * ruby.c (open_load_file): add a comment. Index: gc.c =================================================================== --- gc.c (revision 52166) +++ gc.c (revision 52167) @@ -7419,7 +7419,7 @@ aligned_malloc(size_t alignment, size_t https://github.com/ruby/ruby/blob/trunk/gc.c#L7419 #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) https://github.com/ruby/ruby/blob/trunk/gc.c#L7453 { #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); Index: dln.c =================================================================== --- dln.c (revision 52166) +++ dln.c (revision 52167) @@ -1117,12 +1117,12 @@ dln_sym(const char *name) https://github.com/ruby/ruby/blob/trunk/dln.c#L1117 #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) https://github.com/ruby/ruby/blob/trunk/dln.c#L1254 #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]; Index: ext/sdbm/_sdbm.c =================================================================== --- ext/sdbm/_sdbm.c (revision 52166) +++ ext/sdbm/_sdbm.c (revision 52167) @@ -372,7 +372,7 @@ makroom(register DBM *db, long int hash, https://github.com/ruby/ruby/blob/trunk/ext/sdbm/_sdbm.c#L372 { 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, https://github.com/ruby/ruby/blob/trunk/ext/sdbm/_sdbm.c#L399 * 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/