]> granicus.if.org Git - libexpat/commit
Only define _CRT_RAND_S when not already defined.
authorbungeman <bungeman@chromium.org>
Wed, 18 Sep 2019 14:39:05 +0000 (10:39 -0400)
committerGitHub <noreply@github.com>
Wed, 18 Sep 2019 14:39:05 +0000 (10:39 -0400)
commitc6de942020d46e50efcc4b73dbe70d9c3292743a
treeddcb259679e758d7ae6114a8a5b5dcfd08b36b84
parent6b1996334139e6d175d2bb7ceda6a30b0342c418
Only define _CRT_RAND_S when not already defined.

There exist builds which go out of their way to define _CRT_RAND_S for everything by forcing it into the list of macros defined on the command line to the compiler. Unfortunately, something like "-D_CRT_RAND_S" implies _CRT_RAND_S is defined to be '1' and defining it to be empty produces a redefinition.

Since the intention here is to ensure that _CRT_RAND_S is always defined, only define it if it isn't already defined.
expat/lib/xmlparse.c