From: Firstworks/4access <dav...@fi...> - 2005-08-26 16:37:19
|
Ahhh, so on solaris, strchr/strstr/strrchr all return const char * rather than char *. That's actually very cool. It's always bugged me that glibc's versions of those functions return char * and I've been looking for an excuse to make my findFirst/findLast methods return a const char *. Now I have one :) I guess I need versions of them that take a char * first parameter though :). I'll fix that in the next prerelease. Dave On Fri, 2005-08-26 at 19:23 +0400, Dmitry Sivachenko wrote: > On Fri, Aug 26, 2005 at 11:02:33AM -0400, David Muse wrote: > > Yes, the http://www.firstworks.com/sqlrelay-0.37pre2.tar.gz tarball > > contains both rudiments and sqlrelay and both contain > > sun-compiler-specific updates. >=20 > Well, I see. >=20 > Now I get: >=20 > CC -pipe -D_REENTRANT -D_THREAD_SAFE -D__EXTENSIONS__ -I../ -I../inclu= de -c signalclasses.C -o signalclasses.o >/dev/null 2>&1 > /bin/sh ../libtool --mode=3Dcompile CC -pipe -D_REENTRANT -D_THREAD_SA= FE -D__EXTENSIONS__ -I../ -I../include -c charstring.C -o charstring.= lo > CC -pipe -D_REENTRANT -D_THREAD_SAFE -D__EXTENSIONS__ -I../ -I../inclu= de -c charstring.C -KPIC -DPIC -o .libs/charstring.o > CC: Warning: Option -pipe passed to ld, if ld is invoked, ignored other= wise > "charstring.C", line 740: Error: Cannot return const char* from a funct= ion that should return char*. > "charstring.C", line 744: Error: Cannot return const char* from a funct= ion that should return char*. > "charstring.C", line 748: Error: Cannot return const char* from a funct= ion that should return char*. > 3 Error(s) detected. > make[1]: *** [charstring.lo] Error 1 > make[1]: Leaving directory `/tmp/rudiments-0.29/src' > make: *** [all] Error 2 >=20 >=20 >=20 > I use Sun Studio 10. >=20 >=20 > >=20 > > Dave > >=20 > > On Fri, 2005-08-26 at 18:30 +0400, Dmitry Sivachenko wrote: > > > Please note that I submitted a patch for *rudiments*, not for sqlre= lay. > > >=20 > > >=20 > > >=20 > > > On Fri, Aug 26, 2005 at 10:24:49AM -0400, Firstworks/4access wrote: > > > > Take a look at http://www.firstworks.com/sqlrelay-0.37pre2.tar.gz > > > >=20 > > > > I recently made a bunch of changes to support sun compilers inclu= ding a > > > > check to see if the compiler supports -Wall at configure-time. I > > > > believe it also includes these fixes. > > > >=20 > > > > I'm still working on some errors involving different compatibilit= y > > > > modes, but hopefully they'll be fixed soon. > > > >=20 > > > > David Muse > > > > dav...@fi... > > > >=20 > > > >=20 > > > > On Fri, 2005-08-26 at 11:40 +0400, Dmitry Sivachenko wrote: > > > > > Hello! > > > > >=20 > > > > > I propose the following patch to rudiments (made against 0.28.2= ). > > > > >=20 > > > > > Patch to configure.in is to eliminate mandatory '-Wall' from CP= PFLAGS > > > > > since there are compilers (say Sun Studio) which do not recongn= ize > > > > > this flag. One can always add this switch to their CPPFLAGS if= desired. > > > > >=20 > > > > > Patch to charstring.h fixes the inconsistency between declarati= ons in > > > > > charstring.h and src/charstring.C. This is actually a bug which= gcc hides, > > > > > I suppose. > > > > >=20 > > > > > Thanks! > > > > >=20 > > > > >=20 > > > > > --- include/rudiments/charstring.h.orig =D0=A7=D1=82=D0=B2 =D0=AF= =D0=BD=D0=B2 27 06:35:07 2005 > > > > > +++ include/rudiments/charstring.h =D0=9F=D1=82=D0=BD =D0=90=D0= =B2=D0=B3 26 11:34:38 2005 > > > > > @@ -119,7 +119,7 @@ > > > > > const char *needle); > > > > > // Returns true if "haystack" contains "needle" or > > > > > // false otherwise. > > > > > - static bool contains(const char *haystack, char needle); > > > > > + static bool contains(const char *haystack, const char needle= ); > > > > > // Returns true if "haystack" contains "needle" or > > > > > // false otherwise. > > > > > static char *findFirst(const char *haystack, > > > > > @@ -126,7 +126,7 @@ > > > > > const char *needle); > > > > > // Returns a pointer to the first occurrance of "needle" > > > > > // in "haystack" or NULL if not found. > > > > > - static char *findFirst(const char *haystack, char needle); > > > > > + static char *findFirst(const char *haystack, const char need= le); > > > > > // Returns a pointer to the first occurrance of "needle" > > > > > // in "haystack" or NULL if not found. > > > > > static char *findLast(const char *haystack, > > > > > @@ -133,7 +133,7 @@ > > > > > const char *needle); > > > > > // Returns a pointer to the last occurrance of "needle" > > > > > // in "haystack" or NULL if not found. > > > > > - static char *findLast(const char *haystack, char needle); > > > > > + static char *findLast(const char *haystack, const char needl= e); > > > > > // Returns a pointer to the last occurrance of "needle" > > > > > // in "haystack" or NULL if not found. > > > > > =20 > > > > > --- configure.in.orig =D0=A7=D1=82=D0=B2 =D0=90=D0=BF=D1=80 21 = 18:42:05 2005 > > > > > +++ configure.in =D0=9F=D1=82=D0=BD =D0=90=D0=B2=D0=B3 26 11:31= :13 2005 > > > > > @@ -288,7 +288,7 @@ > > > > > INCLUDE_ERROR=3D"1") > > > > > =20 > > > > >=20 > > > > > -CPPFLAGS=3D"-Wall -D_REENTRANT $CPPFLAGS" > > > > > +CPPFLAGS=3D"-D_REENTRANT $CPPFLAGS" > > > > > CXXFLAGS=3D"$SMALLCODE $CXXFLAGS" > > > > > =20 > > > > > AC_SUBST(CPPFLAGS) > > > > >=20 > > > > >=20 > > > > > ------------------------------------------------------- > > > > > SF.Net email is Sponsored by the Better Software Conference & E= XPO > > > > > September 19-22, 2005 * San Francisco, CA * Development Lifecyc= le Practices > > > > > Agile & Plan-Driven Development * Managing Projects & Teams * T= esting & QA > > > > > Security * Process Improvement & Measurement * http://www.sqe.c= om/bsce5sf > > > > > _______________________________________________ > > > > > Sqlrelay-discussion mailing list > > > > > Sql...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussio= n > > > > >=20 > > > >=20 > > > >=20 > > > >=20 > > > > ------------------------------------------------------- > > > > SF.Net email is Sponsored by the Better Software Conference & EXP= O > > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle= Practices > > > > Agile & Plan-Driven Development * Managing Projects & Teams * Tes= ting & QA > > > > Security * Process Improvement & Measurement * http://www.sqe.com= /bsce5sf > > > > _______________________________________________ > > > > Sqlrelay-discussion mailing list > > > > Sql...@li... > > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > >=20 > > >=20 > > > ------------------------------------------------------- > > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle P= ractices > > > Agile & Plan-Driven Development * Managing Projects & Teams * Testi= ng & QA > > > Security * Process Improvement & Measurement * http://www.sqe.com/b= sce5sf > > > _______________________________________________ > > > Sqlrelay-discussion mailing list > > > Sql...@li... > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > >=20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Pra= ctices > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing= & QA > > Security * Process Improvement & Measurement * http://www.sqe.com/bsc= e5sf > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Pract= ices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing &= QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5= sf > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >=20 |