File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1330,6 +1330,31 @@ comment_options_parser(char *str, plpgsql_check_info *cinfo)
13301330 while (_token );
13311331}
13321332
1333+ #ifdef _MSC_VER
1334+
1335+ static void *
1336+ memmem (const void * haystack , size_t haystack_len ,
1337+ const void * const needle , const size_t needle_len )
1338+ {
1339+ if (haystack == NULL ) return NULL ; // or assert(haystack != NULL);
1340+ if (haystack_len == 0 ) return NULL ;
1341+ if (needle == NULL ) return NULL ; // or assert(needle != NULL);
1342+ if (needle_len == 0 ) return NULL ;
1343+
1344+ for (const char * h = haystack ;
1345+ haystack_len >= needle_len ;
1346+ ++ h , -- haystack_len )
1347+ {
1348+ if (!memcmp (h , needle , needle_len ))
1349+ {
1350+ return h ;
1351+ }
1352+ }
1353+ return NULL ;
1354+ }
1355+
1356+ #endif
1357+
13331358static void
13341359comment_options_parsecontent (char * str , size_t bytes , plpgsql_check_info * cinfo )
13351360{
You can’t perform that action at this time.
0 commit comments