diff options
| author | lneto <lneto@NetBSD.org> | 2015-02-19 04:46:22 +0000 |
|---|---|---|
| committer | lneto <lneto@NetBSD.org> | 2015-02-19 04:46:22 +0000 |
| commit | 48b9f4df647bae745741b671ce8cb7b4511fb9fd (patch) | |
| tree | d938577ecefa6ea7f8177c24add1a1916017e99a /external/mit/lua/dist/src/lstrlib.c | |
| parent | 6da14cd18391b0dbaa8d19ba209f131530fe91e3 (diff) | |
lua(4): small fixes in kernel Lua
* fixed hex parsing
* restored lua_isnumber
* removed unwanted macros from luaconf.h
* restored <stdarg.h> include in ldebug.c
* removed doubles from unions
* removed unused functions
Diffstat (limited to 'external/mit/lua/dist/src/lstrlib.c')
| -rw-r--r-- | external/mit/lua/dist/src/lstrlib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/external/mit/lua/dist/src/lstrlib.c b/external/mit/lua/dist/src/lstrlib.c index e533574fb42..47ccda72449 100644 --- a/external/mit/lua/dist/src/lstrlib.c +++ b/external/mit/lua/dist/src/lstrlib.c @@ -1,4 +1,4 @@ -/* $NetBSD: lstrlib.c,v 1.6 2015/02/02 14:03:05 lneto Exp $ */ +/* $NetBSD: lstrlib.c,v 1.7 2015/02/19 04:46:22 lneto Exp $ */ /* ** Id: lstrlib.c,v 1.221 2014/12/11 14:03:07 roberto Exp @@ -985,7 +985,11 @@ static const union { /* dummy structure to get native alignment requirements */ struct cD { char c; +#ifndef _KERNEL union { double d; void *p; lua_Integer i; lua_Number n; } u; +#else /* _KERNEL */ + union { void *p; lua_Integer i; lua_Number n; } u; +#endif }; #define MAXALIGN (offsetof(struct cD, u)) @@ -1172,6 +1176,7 @@ static void packint (luaL_Buffer *b, lua_Unsigned n, } +#ifndef _KERNEL /* ** Copy 'size' bytes from 'src' to 'dest', correcting endianness if ** given 'islittle' is different from native endianness. @@ -1188,6 +1193,7 @@ static void copywithendian (volatile char *dest, volatile const char *src, *(dest--) = *(src++); } } +#endif static int str_pack (lua_State *L) { |
