.PHONY: all clean
.SUFFIXES: .c .o
-OBJS = parser.o database.o util.o dataworks.o database_table.o database_exec.o database_db.o
+OBJS = parser.o database.o util.o dataworks.o database_table.o database_db.o exec.o
all: $(LIB_PREFIX)dataworks$(LIB_SUFFIX) $(STATICLIB_PREFIX)dataworks$(STATICLIB_SUFFIX)
}
/* Converts BE to NE */
-#define __dw_native_endian(arg, type, exec) \
- { \
- type __original = arg; \
- signed char* __ptr = (signed char*)&__original; \
- type __converted; \
- signed char* __converted_ptr = (signed char*)&__converted; \
- int __i; \
- int __endian_check = 1; \
- char __endian = (1 == *(volatile char*)&__endian_check) ? 'L' : 'B'; \
- for(__i = 0; __i < sizeof(type); __i++) { \
- if(__endian == 'L') { \
- __converted_ptr[sizeof(type) - __i - 1] = __ptr[__i]; \
- } else { \
- __converted_ptr[__i] = __ptr[__i]; \
- } \
- } \
- exec; \
- }
+#define __dw_native_endian __dw_big_endian
#ifdef __cplusplus
}