Defining _REENTRANT
won't change the semantics of strtok()
. You'll need to use strtok_r()
.
Do I need to explicitly use `_r` suffix when using `-D_REENTRANT`?
-
09-07-2023 - |
Question
I'm writing an multithreaded application and I'm wondering about following:
When using -D_REENTRANT
macro, do I need to explicitly use _r
suffixed functions?
e.g. Shall I use strtok_r
everywhere in the code or can I use strtok
and make sure I pass -D_REENTRANT
macro to the compiler?
Thanks a lot
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow