Author: fperrad
Date: Mon Oct 1 00:56:53 2007
New Revision: 21715
Modified:
trunk/src/utils.c
Log:
[build] on win32
- linking is broken since r21669 :
src\utils.o: In function
`Parrot_byte_index':C:/fperrad/Parrot/trunk/src/utils.c:660: undefined
reference to `index'
- replace index() by strchr() which is C89
Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c (original)
+++ trunk/src/utils.c Mon Oct 1 00:56:53 2007
@@ -655,11 +655,11 @@
/* looking for the first character of the search string can avoid having to
* inch along, comparing everything. However, if the base string has
- * embedded nulls, index() will stop at the first one, so inching along is
+ * embedded nulls, strchr() will stop at the first one, so inching along is
* the only good solution */
- char *start_pos = index(base_start + start_offset, *search_start);
+ char *start_pos = strchr(base_start + start_offset, *search_start);
- /* index() returns NULL for no match, so start at the start position */
+ /* strchr() returns NULL for no match, so start at the start position */
if (!start_pos)
start_pos = base_start + start_offset;