mesa/st: enable carry/borrow lowering pass
[mesa.git] / src / mesa / main / imports.h
index 53e40b44546278366d9824cb1d2561a5f5e825cc..17a9bd09986b2140d95aad8549abbfcf09331126 100644 (file)
@@ -49,16 +49,10 @@ extern "C" {
 /** Memory macros */
 /*@{*/
 
-/** Allocate \p BYTES bytes */
-#define MALLOC(BYTES)      malloc(BYTES)
-/** Allocate and zero \p BYTES bytes */
-#define CALLOC(BYTES)      calloc(1, BYTES)
 /** Allocate a structure of type \p T */
 #define MALLOC_STRUCT(T)   (struct T *) malloc(sizeof(struct T))
 /** Allocate and zero a structure of type \p T */
 #define CALLOC_STRUCT(T)   (struct T *) calloc(1, sizeof(struct T))
-/** Free memory */
-#define FREE(PTR)          free(PTR)
 
 /*@}*/
 
@@ -132,7 +126,7 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
 #define atanhf(f) ((float) atanh(f))
 #endif
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && (_MSC_VER < 1800)  /* Not req'd on VS2013 and above */
 static inline float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
 static inline float exp2f(float x) { return powf(2.0f, x); }
 static inline float log2f(float x) { return logf(x) * 1.442695041f; }
@@ -141,6 +135,7 @@ static inline float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
 static inline float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
 static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
 #define strtoll(p, e, b) _strtoi64(p, e, b)
+#define strcasecmp(s1, s2) _stricmp(s1, s2)
 #endif
 /*@}*/