[ icewm-Patches-522832 ] icewm-1.0.9 release 2 COMPILE ERROR
Brought to you by:
captnmark
From: <no...@so...> - 2002-03-26 16:54:03
|
Patches item #522832, was opened at 2002-02-26 06:45 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=300031&aid=522832&group_id=31 Category: bugfix Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: icewm-1.0.9 release 2 COMPILE ERROR Initial Comment: misc.cc won't compile under cygwin (and supposedly anything else without HAVE_BASENAME defined) since there is a typo on line 457. The first word on this line should be char, not const. ---------------------------------------------------------------------- Comment By: Mads Laursen (dossen) Date: 2002-03-26 17:53 Message: Logged In: YES user_id=182751 ups, the damn box rearranged it... but it should be clear where the errors lie. ---------------------------------------------------------------------- Comment By: Mads Laursen (dossen) Date: 2002-03-26 17:51 Message: Logged In: YES user_id=182751 Here is a patch for this problem. With this patch I have succesfully compiled on SGI IRIX 6.5 (which does not have basename). diff -u icewm-1.0.9.old/src/base.h icewm-1.0.9/src/base.h --- icewm-1.0.9.old/src/base.h Tue Oct 9 16:54:03 2001 +++ icewm-1.0.9/src/base.h Tue Mar 26 18:36:06 2002 @@ -169,7 +169,11 @@ int strpcmp(char const *str, char const *pfx, char const *delim = "=:"); unsigned strTokens(const char * str, const char * delim = " \t"); char const * strnxt(const char * str, const char * delim = " \t"); +#ifdef HAVE_BASENAME extern "C" char * basename(char const * filename); +#else +const char * basename(char const *path); +#endif inline int unhex(char c) { return ((c >= '0' && c <= '9') ? c - '0' : diff -u icewm-1.0.9.old/src/misc.cc icewm-1.0.9/src/misc.cc --- icewm-1.0.9.old/src/misc.cc Tue Oct 9 16:54:03 2001 +++ icewm-1.0.9/src/misc.cc Tue Mar 26 18:36:01 2002 @@ -454,7 +454,7 @@ } #ifndef HAVE_BASENAME -const * basename(char const *path) { +const char * basename(char const *path) { char * base = ::strrchr(path, DIR_DELIMINATOR); return (base ? base + 1 : path); } PS: Sorry for posting the patch like this, but I can't find the button to attach it as a file. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=300031&aid=522832&group_id=31 |