[Groonga-commit] groonga/groonga at e476456 [master] Remove macros for fpclassify.

Back to archive index

susumu.yata null+****@clear*****
Wed Nov 6 20:26:42 JST 2013


susumu.yata	2013-11-06 20:26:42 +0900 (Wed, 06 Nov 2013)

  New Revision: e476456b815cce462b50569bcbe7fe23dce8ae6f
  https://github.com/groonga/groonga/commit/e476456b815cce462b50569bcbe7fe23dce8ae6f

  Message:
    Remove macros for fpclassify.
    
    To avoid VC++ error C2732.

  Modified files:
    lib/groonga_in.h
    lib/str.c

  Modified: lib/groonga_in.h (+0 -23)
===================================================================
--- lib/groonga_in.h    2013-11-06 19:02:47 +0900 (51e5c82)
+++ lib/groonga_in.h    2013-11-06 20:26:42 +0900 (7905a0c)
@@ -154,16 +154,6 @@
 #define MSG_WAITALL 0 /* before Vista, not supported... */
 #define SHUT_RDWR SD_BOTH
 
-#ifdef HAVE_FPCLASSIFY
-# define CASE_FP_NAN case FP_NAN:
-# define CASE_FP_INFINITE case FP_INFINITE:
-#else
-# define HAVE_FPCLASSIFY 1
-# define fpclassify _fpclass
-# define CASE_FP_NAN case _FPCLASS_SNAN: case _FPCLASS_QNAN:
-# define CASE_FP_INFINITE case _FPCLASS_NINF: case _FPCLASS_PINF:
-#endif /* HAVE_FPCLASSIFY */
-
 typedef SOCKET grn_sock;
 #define grn_sock_close(sock) closesocket(sock)
 
@@ -200,19 +190,6 @@ typedef int grn_sock;
 # define grn_sock_close(sock) close(sock)
 # define CALLBACK
 
-# ifdef HAVE_FPCLASSIFY
-#  define CASE_FP_NAN case FP_NAN:
-#  define CASE_FP_INFINITE case FP_INFINITE:
-# else
-#  if (defined(__sun) && defined(__SVR4)) /* SUN */
-#   define HAVE_FPCLASSIFY 1
-#   include <ieeefp.h>
-#   define fpclassify fpclass
-#   define CASE_FP_NAN case FP_SNAN: case FP_QNAN:
-#   define CASE_FP_INFINITE case FP_NINF: case FP_PINF:
-#  endif /* SUN */
-# endif /* HAVE_FPCLASSIFY */
-
 #endif /* WIN32 */
 
 #ifndef INT8_MAX

  Modified: lib/str.c (+2 -2)
===================================================================
--- lib/str.c    2013-11-06 19:02:47 +0900 (4f8f58c)
+++ lib/str.c    2013-11-06 20:26:42 +0900 (232ec8c)
@@ -2099,10 +2099,10 @@ grn_text_ftoa(grn_ctx *ctx, grn_obj *buf, double d)
   }
 #ifdef HAVE_FPCLASSIFY
   switch (fpclassify(d)) {
-  CASE_FP_NAN
+  case FP_NAN :
     GRN_TEXT_PUTS(ctx, buf, "#<nan>");
     break;
-  CASE_FP_INFINITE
+  case FP_INFINITE :
     GRN_TEXT_PUTS(ctx, buf, d > 0 ? "#i1/0" : "#i-1/0");
     break;
   default :
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index