mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
avoid clash with strnstr() declaration on bsd systems
This commit is contained in:
parent
3b1bf24b26
commit
0ece3b8980
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
#import "Testing.h"
|
||||
|
||||
static int
|
||||
strnstr(const uint8_t *buf, unsigned len, const uint8_t *str)
|
||||
find(const char *buf, unsigned len, const char *str)
|
||||
{
|
||||
int l = strlen(str);
|
||||
int max = len - l;
|
||||
|
@ -67,7 +67,7 @@ int main(int argc,char **argv)
|
|||
const char *bytes = "MIME-Version: 1.0\r\n"
|
||||
"Content-Type: text/plain; type=\"my/type\"\r\n"
|
||||
"Subject: =?utf-8?B?4oKs?=\r\n\r\n";
|
||||
PASS(strnstr([data bytes], [data length], "?B?4oKs?=") > 0,
|
||||
PASS(find((char*)[data bytes], (unsigned)[data length], "?B?4oKs?=") > 0,
|
||||
"encodes utf-8 euro in subject");
|
||||
|
||||
[arp release]; arp = nil;
|
||||
|
|
Loading…
Reference in a new issue