mirror of
https://github.com/lua/lua
synced 2024-11-24 21:59:41 +03:00
New macro LUA_USE_IOS
Do not try to detect automatically whether system is iOS; it is simpler and more reliable to let the programmer inform that.
This commit is contained in:
parent
c888ae0aea
commit
cf08915d62
17
loslib.c
17
loslib.c
@ -138,21 +138,14 @@
|
||||
/* }================================================================== */
|
||||
|
||||
|
||||
/*
|
||||
** Despite claiming to be ISO, the C library in some Apple platforms
|
||||
** does not implement 'system'.
|
||||
*/
|
||||
#if !defined(l_system) && defined(__APPLE__) /* { */
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
|
||||
#define l_system(cmd) ((cmd) == NULL ? 0 : -1)
|
||||
#endif
|
||||
#endif /* } */
|
||||
|
||||
#if !defined(l_system)
|
||||
#if defined(LUA_USE_IOS)
|
||||
/* Despite claiming to be ISO C, iOS does not implement 'system'. */
|
||||
#define l_system(cmd) ((cmd) == NULL ? 0 : -1)
|
||||
#else
|
||||
#define l_system(cmd) system(cmd) /* default definition */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static int os_execute (lua_State *L) {
|
||||
|
Loading…
Reference in New Issue
Block a user