-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
When compiling any code that uses SEEK_SET
, SEEK_CUR
or SEEK_END
with a preprocessor conditional, the compiler will error.
I have included error output below. Please let me know if this should be asked upstream, I have searched the internet but could not find anything about this particular issue.
./Modules/_io/fileio.c:890:5: error: token is not a valid binary operator in a preprocessor subexpression
#if SEEK_SET != 0
^~~~~~~~
/home/e/install/emsdk/upstream/emscripten/system/include/libc/fcntl.h:80:18: note: expanded from macro 'SEEK_SET'
#define SEEK_SET __WASI_WHENCE_SET
^~~~~~~~~~~~~~~~~
/home/e/install/emsdk/upstream/emscripten/system/include/wasi/api.h:693:45: note: expanded from macro '__WASI_WHENCE_SET'
#define __WASI_WHENCE_SET ((__wasi_whence_t)0)
~~~~~~~~~~~~~~~~~^
./Modules/_io/fileio.c:893:5: error: token is not a valid binary operator in a preprocessor subexpression
#if SEEK_CUR != 1
^~~~~~~~
/home/e/install/emsdk/upstream/emscripten/system/include/libc/fcntl.h:81:18: note: expanded from macro 'SEEK_CUR'
#define SEEK_CUR __WASI_WHENCE_CUR
^~~~~~~~~~~~~~~~~
/home/e/install/emsdk/upstream/emscripten/system/include/wasi/api.h:698:45: note: expanded from macro '__WASI_WHENCE_CUR'
#define __WASI_WHENCE_CUR ((__wasi_whence_t)1)
~~~~~~~~~~~~~~~~~^
./Modules/_io/fileio.c:896:5: error: token is not a valid binary operator in a preprocessor subexpression
#if SEEK_END != 2
^~~~~~~~
/home/e/install/emsdk/upstream/emscripten/system/include/libc/fcntl.h:82:18: note: expanded from macro 'SEEK_END'
#define SEEK_END __WASI_WHENCE_END
^~~~~~~~~~~~~~~~~
/home/e/install/emsdk/upstream/emscripten/system/include/wasi/api.h:703:45: note: expanded from macro '__WASI_WHENCE_END'
#define __WASI_WHENCE_END ((__wasi_whence_t)2)
Metadata
Metadata
Assignees
Labels
No labels