Menu

#1 Some minor compile fixes for older gcc (2.95.3)

open
nobody
None
5
2014-09-25
2007-01-03
No

This patch allows imspector to compile under gcc 2.95.3. However, this patch breaks case insensitivity in the badwords filter and removes the irc plugin from the make.

In particular, it fixes correctly a minor reserved word issue in icqprotocolplugin.cpp by changing "xor" to "^" and a strftime problem in fileloggingplugin.cpp.

It hacks the code to avoid 2 problems that I did not fix.
badwordscontentplugin.cpp calls strcasestr which does not exist in my clibs. So I changed it to call strstr. This breaks case insensitivity but I don't want support for the word filtering anyway. I tried to compile the software without the badwords plugin but the software crashes if it cannot load it.

I also removed ircprotocolplugin.so from the makefile to avoid the following error since I also don't need irc support:

ircprotocolplugin.cpp: In function `int processpacket(bool, Socket &, char *, int *, vector<imevent,allocator<imevent> > &, string &, vector<messageextent,allocator<messageextent> > &)':
ircprotocolplugin.cpp:126: `::transform' undeclared (first use here)
make: *** [ircprotocolplugin.o] Error 1

Discussion

  • David R Hinkle

    David R Hinkle - 2007-01-03

    Compatability patches for older gcc (2.95.3)

     
  • Lawrence Manning

    Logged In: YES
    user_id=68527
    Originator: NO

    Cheers for the patch. Comments:

    xor to ^ is certainly a valid fix.

    transform is obviously a method missing from your std::string. This could probably be fairly easy rewritten, but I'm loath to "cripple" IMSpector by making it compatible with such an old compiler/clib.

    It should run without the badwords plugin so that is clearly a bug to be looked into.

    Thanks very much for submitting the patch.

     

Log in to post a comment.

Auth0 Logo