[Mesa-dev] [PATCH 2/7] glsl/glsl_parser.yy: vs12 doesn't have strcasecmp, use _stricmp instead
Alon Levy
alevy at redhat.com
Thu Jul 24 11:10:07 PDT 2014
On 07/24/2014 07:50 PM, Emil Velikov wrote:
> On 24/07/14 17:07, Matt Turner wrote:
>> On Thu, Jul 24, 2014 at 5:44 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> On 23/07/14 22:16, Ian Romanick wrote:
>>>> On 07/22/2014 02:07 PM, Alon Levy wrote:
>>>>> Signed-off-by: Alon Levy <alevy at redhat.com>
>>>>> ---
>>>>> src/glsl/glsl_parser.yy | 4 ++++
>>>>> 1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
>>>>> index faaf438..25370cd 100644
>>>>> --- a/src/glsl/glsl_parser.yy
>>>>> +++ b/src/glsl/glsl_parser.yy
>>>>> @@ -26,6 +26,10 @@
>>>>> #include <string.h>
>>>>> #include <assert.h>
>>>>>
>>>>> +#ifdef _MSC_VER <= 1800
>>>>> +#define strcasecmp _stricmp
>>>>> +#endif
>>>>> +
>>>>
>>>> glsl_parser.yy should already get the strcasecmp work around from
>>>> src/mesa/main/imports.h.
>>>>
>>> Just a general question - wouldn't it be better if we move some/all these
>>> quirks around the POSIX standard(s) into a header similar to c99_compat ? ...
>>> before the amount of duplication gets out of hand.
>>
>> Sounds like a good idea to me, although I don't think strcasecmp is part of C99.
>>
> You're absolutely correct. I was thinking about posix_compat.h ("header
> similar to c99_compat") where he can put all the quirks needed for non POSIX
> compliant setups. Unfortunately I don't think I have the time for this atm.
>
> -Emil
>
I can make a patch for just this case as a start.. If anyone has some
clues as to the rest of the non posix parts and how to test that I'm not
screwing anything up I can go for a fuller patch.
More information about the mesa-dev
mailing list