+#define lua_pushnumeric(l, n) lua_pushlong(l, n)
+#define lua_tonumeric(l, n) lua_tolong(l, n)
+#define lua_isnumeric(l, n) lua_islong(l, n)
+
+extern struct rusage r_usages;
+extern struct rusage r_usagee;
+
+#define USEC_DIFFERENTIAL 1000000
+
+#ifdef LUA_PROFILE
+
+#define ACCOUNTING_START(l) { l->calls++; getrusage(RUSAGE_SELF, &r_usages);
+
+#define twrap(A2, B2, C2, D2) A2(&(B2), &(C2), &(D2))
+
+#define _SET_2TIMEDIFF(L4, S2, E2, I2) twrap(timersub, E2.I2, S2.I2, E2.I2); twrap(timeradd, L4->I2, E2.I2, L4->I2);
+#define SET_TIMEDIFF(L3, S2, E2) _SET_2TIMEDIFF(L3, S2, E2, ru_utime); _SET_2TIMEDIFF(L3, S2, E2, ru_stime);
+
+#define ACCOUNTING_STOP(l) getrusage(RUSAGE_SELF, &r_usagee); SET_TIMEDIFF(l, r_usages, r_usagee); }