瀏覽代碼

make CMPLX macros available in complex.h in non-c11 mode as well

Szabolcs Nagy 12 年之前
父節點
當前提交
faea4c9937
共有 2 個文件被更改,包括 0 次插入10 次删除
  1. 0 2
      include/complex.h
  2. 0 8
      src/internal/libm.h

+ 0 - 2
include/complex.h

@@ -115,11 +115,9 @@ long double creall(long double complex);
 #define __CMPLX(x, y, t) \
 	((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z)
 
-#if __STDC_VERSION__ >= 201112L
 #define CMPLX(x, y) __CMPLX(x, y, double)
 #define CMPLXF(x, y) __CMPLX(x, y, float)
 #define CMPLXL(x, y) __CMPLX(x, y, long double)
-#endif
 
 #ifdef __cplusplus
 }

+ 0 - 8
src/internal/libm.h

@@ -168,12 +168,4 @@ long double __p1evll(long double, const long double *, int);
 #define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval))
 #endif
 
-/* complex */
-
-#ifndef CMPLX
-#define CMPLX(x, y) __CMPLX(x, y, double)
-#define CMPLXF(x, y) __CMPLX(x, y, float)
-#define CMPLXL(x, y) __CMPLX(x, y, long double)
-#endif
-
 #endif