Changeset: 3e0c184174c9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e0c184174c9
Modified Files:
MonetDB5/src/modules/mal/attach.mx
Branch: default
Log Message:
making code portable to fix Windows compilation: rindex() -> strrchr()
`man rindex` says:
"
CONFORMING TO
4.3BSD; marked as LEGACY in POSIX.1-2001.
POSIX.1-2008 removes the specifications of index() and rindex(),
recommending strchr(3) and strrchr(3) instead.
"
diffs (12 lines):
diff -r afa9a7d23a7f -r 3e0c184174c9 MonetDB5/src/modules/mal/attach.mx
--- a/MonetDB5/src/modules/mal/attach.mx Thu Jul 22 10:45:14 2010 +0200
+++ b/MonetDB5/src/modules/mal/attach.mx Thu Jul 22 10:47:39 2010 +0200
@@ -216,7 +216,7 @@
snprintf(path,BUFSIZ,"%s%c%s%c",GDKgetenv("gdk_dbfarm"),DIR_SEP,GDKgetenv("gdk_dbname"),DIR_SEP);
GDKfilepath(path+strlen(path), BATDIR, ( b->T->heap.filename ?
b->T->heap.filename: b->H->heap.filename), 0);
- s= rindex(path,'.');
+ s= strrchr(path,'.');
if( s) *s = 0;
*ret = GDKstrdup(path);
return MAL_SUCCEED;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list