Re: [opensc-commits] svn opensc changed [2429] No strncasecmp() on Windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [opensc-commits] svn opensc changed [2429] No strncasecmp() on Windows

Nils Larsch
[hidden email] wrote:

> Revision: 2429
> Author:   sth
> Date:     2005-07-18 11:51:34 +0000 (Mon, 18 Jul 2005)
>
> Log Message:
> -----------
> No strncasecmp() on Windows
>
> Modified Paths:
> --------------
>     trunk/src/libp11/p11_key.c
> Modified: trunk/src/libp11/p11_key.c
> ===================================================================
> --- trunk/src/libp11/p11_key.c 2005-07-18 09:15:06 UTC (rev 2428)
> +++ trunk/src/libp11/p11_key.c 2005-07-18 11:51:34 UTC (rev 2429)
> @@ -58,6 +58,10 @@
>  #include <string.h>
>  #include "libp11-int.h"
>  
> +#ifndef strncasecmp
> +#define strncasecmp strnicmp
> +#endif
> +

this doesn't work, it will always define strncasecmp as
strnicmp because strncasecmp is not a macro (at least not
on my system)

Nils
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [opensc-commits] svn opensc changed [2429] No strncasecmp() on Windows

Stef Hoeben
Ah...

I copied that code from config.h, but on Windows the config.h
is a rename of winconfig.h, so that's why this error never manifested
itself before on non-Windows machines...

I'll replace it with an #ifdef _WIN32..

Stef

Nils Larsch schreef:

> [hidden email] wrote:
>
>> Revision: 2429
>> Author:   sth
>> Date:     2005-07-18 11:51:34 +0000 (Mon, 18 Jul 2005)
>>
>> Log Message:
>> -----------
>> No strncasecmp() on Windows
>>
>> Modified Paths:
>> --------------
>>     trunk/src/libp11/p11_key.c
>> Modified: trunk/src/libp11/p11_key.c
>> ===================================================================
>> --- trunk/src/libp11/p11_key.c    2005-07-18 09:15:06 UTC (rev 2428)
>> +++ trunk/src/libp11/p11_key.c    2005-07-18 11:51:34 UTC (rev 2429)
>> @@ -58,6 +58,10 @@
>>  #include <string.h>
>>  #include "libp11-int.h"
>>  
>> +#ifndef strncasecmp
>> +#define strncasecmp strnicmp
>> +#endif
>> +
>
>
> this doesn't work, it will always define strncasecmp as
> strnicmp because strncasecmp is not a macro (at least not
> on my system)
>
> Nils
> _______________________________________________
> opensc-devel mailing list
> [hidden email]
> http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
>

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel