Commit e6eac7863e2bf1a009ea863041b354bdb4af6b67

Gregory Pakosz 2018-09-18T15:19:53

Prefix ALIGN_DOWN macro with FFI_

diff --git a/include/ffi_common.h b/include/ffi_common.h
index 7fb0a64..ee9cdcb 100644
--- a/include/ffi_common.h
+++ b/include/ffi_common.h
@@ -77,7 +77,7 @@ void ffi_type_test(ffi_type *a, char *file, int line);
 /* v cast to size_t and aligned up to a multiple of a */
 #define FFI_ALIGN(v, a)  (((((size_t) (v))-1) | ((a)-1))+1)
 /* v cast to size_t and aligned down to a multiple of a */
-#define ALIGN_DOWN(v, a) (((size_t) (v)) & -a)
+#define FFI_ALIGN_DOWN(v, a) (((size_t) (v)) & -a)
 
 /* Perform machine dependent cif processing */
 ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
diff --git a/src/frv/ffi.c b/src/frv/ffi.c
index 62ae652..ed1c65a 100644
--- a/src/frv/ffi.c
+++ b/src/frv/ffi.c
@@ -107,7 +107,7 @@ void *ffi_prep_args(char *stack, extended_cif *ecif)
       count += z;
     }
 
-  return (stack + ((count > 24) ? 24 : ALIGN_DOWN(count, 8)));
+  return (stack + ((count > 24) ? 24 : FFI_ALIGN_DOWN(count, 8)));
 }
 
 /* Perform machine dependent cif processing */
diff --git a/src/metag/ffi.c b/src/metag/ffi.c
index dfc1e39..3aecb0b 100644
--- a/src/metag/ffi.c
+++ b/src/metag/ffi.c
@@ -61,7 +61,7 @@ unsigned int ffi_prep_args(char *stack, extended_cif *ecif)
 		argp -= z;
 
 		/* Align if necessary */
-		argp = (char *) ALIGN_DOWN(ALIGN_DOWN(argp, (*p_arg)->alignment), 4);
+		argp = (char *) FFI_ALIGN_DOWN(FFI_ALIGN_DOWN(argp, (*p_arg)->alignment), 4);
 
 		if (z < sizeof(int)) {
 			z = sizeof(int);
diff --git a/src/moxie/ffi.c b/src/moxie/ffi.c
index 21144e8..16d2bb3 100644
--- a/src/moxie/ffi.c
+++ b/src/moxie/ffi.c
@@ -100,7 +100,7 @@ void *ffi_prep_args(char *stack, extended_cif *ecif)
       count += z;
     }
 
-  return (stack + ((count > 24) ? 24 : ALIGN_DOWN(count, 8)));
+  return (stack + ((count > 24) ? 24 : FFI_ALIGN_DOWN(count, 8)));
 }
 
 /* Perform machine dependent cif processing */