part-cw / lambdanative

LambdaNative is a cross-platform development environment written in Scheme, supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt.

Home Page:http://www.lambdanative.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS warning: shifting a negative signed value is undefined [-Wshift-negative-value]

karliwalti opened this issue · comments

Just started again with building for iOS on MAC

getting this error code for DemoHelloWorld

/Users/wkarlen/Library/Caches/lambdanative/ios/arm64/build/2944264680.c:4439:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
 ___DEF_CNS(___REF_SYM(12,___S_invalid_2d_clock_2d_type),___REF_CNS(1))
 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/wkarlen/Library/Caches/lambdanative/ios/arm64/include/gambit.h:2133:48: note: expanded from macro '___REF_SYM'
#define ___REF_SYM(i,id)((___CAST(___WORD,-1-i)<<___TB)+___tMEM2)
                                               ^
/Users/wkarlen/Library/Caches/lambdanative/ios/arm64/include/gambit.h:5449:84: note: expanded from macro '___DEF_CNS'
#define ___DEF_CNS(car,cdr)___MAKE_HD((___PAIR_SIZE<<___LWS),___sPAIR,___PERM),cdr,car

Can you please post the actual error - this is a warning, which will not stop compilation and there are lots of them. The symbol is defined at modules/ln_core/time.scm#L150 and applied in modules/ln_core/time.scm#L161 so I don't see how this is an issue?

Yes, sorry, the actual error is

2944264680.c:271268:24: error: implicit declaration of function 'getpid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
___CFUN_CALL(___result,getpid())

All I could find about this is here: https://developer.apple.com/forums/thread/127217

getpid is defined in modules/ln_core/log.scm#L137 - I guess this needs declaring?

Would this be enough?

(c-declare  #<<end-of-c-declare
#include <unistd.h>
end-of-c-declare
)