luanut.h 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _INCLUDE_LUANUT_H_
  2. #define _INCLUDE_LUANUT_H_
  3. #include <cfg/lua.h>
  4. #ifndef NUTLUA_FLOATING_POINT
  5. /*! \brief Enable Lua integer mode. */
  6. #define LUA_NUMBER_INT
  7. #endif
  8. /*! \name Unsupported Lua functions. */
  9. /*@{*/
  10. #define NUTLUA_IOLIB_TMPFILE_NOT_IMPLEMENTED
  11. #define NUTLUA_IOLIB_SETVBUF_NOT_IMPLEMENTED
  12. #define NUTLUA_OSLIB_CLOCK_NOT_IMPLEMENTED
  13. #define NUTLUA_OSLIB_DATE_STRING_NOT_IMPLEMENTED
  14. #define NUTLUA_OSLIB_REMOVE_NOT_IMPLEMENTED
  15. #define NUTLUA_OSLIB_TMPNAME_NOT_IMPLEMENTED
  16. #define NUTLUA_OSLIB_DIFFTIME_NOT_IMPLEMENTED
  17. #define NUTLUA_OSLIB_EXIT_NOT_IMPLEMENTED
  18. #define NUTLUA_OSLIB_RENAME_NOT_IMPLEMENTED
  19. #define NUTLUA_OSLIB_EXECUTE_NOT_IMPLEMENTED
  20. #define NUTLUA_OSLIB_SETLOCALE_NOT_IMPLEMENTED
  21. /*@}*/
  22. /* math lib fixes. */
  23. #ifdef LUA_NUMBER_INT
  24. #undef HUGE_VAL
  25. #define HUGE_VAL __INT_MAX__
  26. #else
  27. #ifndef HUGE_VAL
  28. #define HUGE_VAL __DBL_MAX__
  29. #endif
  30. #endif
  31. #if defined(__AVR__)
  32. #include <sys/environ.h>
  33. /* Hack. */
  34. #define strerror(errno) ("Error")
  35. #endif /* __AVR__ */
  36. #endif