larbin-2.6.3-gcc44.patch |
发布: 2009-07-18 12:33 |
larbin好久没有更新了,在现在的gcc4上无法正常编译,简单修改了一下,已经编译成功。这是对larbin-2.6.3的 gcc 4.4 的patch. patch文件下载:larbin-2.6.3-gcc44.patch patch使用方法: [code type="bash"] tar xvf larbin-2.6.3.tar.gz cd larbin-2.6.3 patch -Np1 -i /path/to/larbin-2.6.3-gcc44.patch [/code] patch文件全文: [code type="diff"] diff --git a/adns/parse.c b/adns/parse.c index 73f53f7..b5ec61b 100644 --- a/adns/parse.c +++ b/adns/parse.c @@ -111,7 +111,7 @@ adns_status adns__findlabel_next(findlabel_state *fls, } adns_status adns__parse_domain(adns_state ads, int serv, adns_query qu, - vbuf *vb, adns_queryflags flags, + vbuf *vb, parsedomain_flags flags, const byte *dgram, int dglen, int *cbyte_io, int max) { findlabel_state fls; diff --git a/src/fetch/checker.cc b/src/fetch/checker.cc index 6ac8f53..415efdb 100644 --- a/src/fetch/checker.cc +++ b/src/fetch/checker.cc @@ -7,7 +7,7 @@ * and send them if it didn't see them before */ -#include +#include #include #include "options.h" diff --git a/src/fetch/fetchOpen.cc b/src/fetch/fetchOpen.cc index 2d3fa99..cdf0c13 100644 --- a/src/fetch/fetchOpen.cc +++ b/src/fetch/fetchOpen.cc @@ -2,7 +2,7 @@ // Sebastien Ailleret // 15-11-99 -> 04-12-01 -#include +#include #include #include diff --git a/src/fetch/fetchPipe.cc b/src/fetch/fetchPipe.cc index cec67d8..5a42638 100644 --- a/src/fetch/fetchPipe.cc +++ b/src/fetch/fetchPipe.cc @@ -2,7 +2,7 @@ // Sebastien Ailleret // 15-11-99 -> 19-11-01 -#include +#include #include #include #include diff --git a/src/fetch/file.cc b/src/fetch/file.cc index d09ca09..3ced3de 100644 --- a/src/fetch/file.cc +++ b/src/fetch/file.cc @@ -3,7 +3,7 @@ // 14-12-99 -> 19-03-02 #include -#include +#include #include #include #include diff --git a/src/fetch/hashTable.cc b/src/fetch/hashTable.cc index 4473f8f..c1dd10a 100644 --- a/src/fetch/hashTable.cc +++ b/src/fetch/hashTable.cc @@ -2,7 +2,8 @@ // Sebastien Ailleret // 23-11-99 -> 15-02-01 -#include +#include + #include #include #include @@ -29,7 +30,7 @@ hashTable::hashTable (bool create) { } else { int fds = open("hashtable.bak", O_RDONLY); if (fds < 0) { - cerr << "Cannot find hashtable.bak, restart from scratch\n"; + std::cerr << "Cannot find hashtable.bak, restart from scratch\n"; for (ssize_t i=0; i } @@ -38,8 +39,8 @@ hashTable::hashTable (bool create) { while (sr < total) { ssize_t tmp = read(fds, table+sr, total-sr); if (tmp <= 0) { - cerr << "Cannot read hashtable.bak : " - << strerror(errno) << endl; + std::cerr << "Cannot read hashtable.bak : " + << strerror(errno) << std::endl; exit(1); } else { sr += tmp; diff --git a/src/fetch/sequencer.cc b/src/fetch/sequencer.cc index aa51a8f..58cfbd5 100644 --- a/src/fetch/sequencer.cc +++ b/src/fetch/sequencer.cc @@ -2,7 +2,7 @@ // Sebastien Ailleret // 15-11-99 -> 04-01-02 -#include +#include #include "options.h" diff --git a/src/global.cc b/src/global.cc index dcedee2..bb5cd42 100644 --- a/src/global.cc +++ b/src/global.cc @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -105,8 +105,8 @@ global::global (int argc, char *argv[]) { } } if (pos != argc) { - cerr << "usage : " << argv[0]; - cerr << " [-c configFile] [-scratch]\n"; + std::cerr << "usage : " << argv[0]; + std::cerr << " [-c configFile] [-scratch]\n"; exit(1); } @@ -196,7 +196,7 @@ global::global (int argc, char *argv[]) { sn.sa_flags = SA_RESTART; sn.sa_handler = SIG_IGN; if (sigaction(SIGPIPE, &sn, &so)) { - cerr << "Unable to disable SIGPIPE : " << strerror(errno) << endl; + std::cerr << "Unable to disable SIGPIPE : " << strerror(errno) << std::endl; } } @@ -210,8 +210,8 @@ global::~global () { void global::parseFile (char *file) { int fds = open(file, O_RDONLY); if (fds < 0) { - cerr << "cannot open config file (" << file << ") : " - << strerror(errno) << endl; + std::cerr << "cannot open config file (" << file << ") : " + << strerror(errno) << std::endl; exit(1); } char *tmp = readfile(fds); @@ -238,7 +238,7 @@ void global::parseFile (char *file) { if (u->isValid()) { check(u); } else { - cerr << "the start url " << tok << " is invalid\n"; + std::cerr << "the start url " << tok << " is invalid\n"; exit(1); } } else if (!strcasecmp(tok, "waitduration")) { @@ -252,7 +252,7 @@ void global::parseFile (char *file) { memset((char *) proxyAddr, 0, sizeof (struct sockaddr_in)); if ((hp = gethostbyname(tok)) == NULL) { endhostent(); - cerr << "Unable to find proxy ip address (" << tok << ")\n"; + std::cerr << "Unable to find proxy ip address (" << tok << ")\n"; exit(1); } else { proxyAddr->sin_family = hp->h_addrtype; @@ -284,7 +284,7 @@ void global::parseFile (char *file) { } else if (!strcasecmp(tok, "noExternalLinks")) { externalLinks = false; } else { - cerr << "bad configuration file : " << tok << "\n"; + std::cerr << "bad configuration file : " << tok << "\n"; exit(1); } tok = nextToken(&posParse); @@ -303,7 +303,7 @@ void global::manageDomain (char **posParse) { tok = nextToken(posParse); } if (tok == NULL) { - cerr << "Bad configuration file : no end to limitToDomain\n"; + std::cerr << "Bad configuration file : no end to limitToDomain\n"; exit(1); } } @@ -322,7 +322,7 @@ void global::manageExt (char **posParse) { tok = nextToken(posParse); } if (tok == NULL) { - cerr << "Bad configuration file : no end to forbiddenExtensions\n"; + std::cerr << "Bad configuration file : no end to forbiddenExtensions\n"; exit(1); } } [/code] [code type="diff"] diff --git a/src/interf/defaultuseroutput.cc b/src/interf/defaultuseroutput.cc index ed719ac..0b2ffeb 100644 --- a/src/interf/defaultuseroutput.cc +++ b/src/interf/defaultuseroutput.cc @@ -2,7 +2,8 @@ // Sebastien Ailleret // 07-12-01 -> 07-12-01 -#include +#include + #include #include diff --git a/src/interf/input.cc b/src/interf/input.cc index 2dd35cc..cf1bb4e 100644 --- a/src/interf/input.cc +++ b/src/interf/input.cc @@ -3,7 +3,7 @@ // 03-02-00 -> 23-11-01 #include -#include +#include #include #include #include @@ -200,7 +200,7 @@ void initInput () { (char*)&allowReuse, sizeof(allowReuse)) || bind(inputFds, (struct sockaddr *) &addr, sizeof(addr)) != 0 || listen(inputFds, 4) != 0) { - cerr << "unable to get input socket (port " << global::inputPort + std::cerr << "unable to get input socket (port " << global::inputPort << ") : " << strerror(errno) << "\n"; exit(1); } diff --git a/src/interf/output.cc b/src/interf/output.cc index 2197d12..fe58792 100644 --- a/src/interf/output.cc +++ b/src/interf/output.cc @@ -2,7 +2,7 @@ // Sebastien Ailleret // 03-02-00 -> 10-12-01 -#include +#include #include #include diff --git a/src/larbin.make b/src/larbin.make index 055ebde..7c5ffd1 100644 --- a/src/larbin.make +++ b/src/larbin.make @@ -20,7 +20,7 @@ ABS-FETCH-OBJ:=fetch/site.o fetch/sequencer.o fetch/hashTable.o \ ABS-MAIN-OBJ:=$(MAIN-OBJ) CFLAGS:=-O3 -Wall -D_REENTRANT -CXXFLAGS:= -Wno-deprecated -Wall -O3 -D_REENTRANT -I- -I$(BASEDIR) -I$(ADNSDIR) +CXXFLAGS:= -Wno-deprecated -Wall -O3 -D_REENTRANT -I$(BASEDIR) -I$(ADNSDIR) RM:=rm -f first: all diff --git a/src/utils/PersistentFifo.cc b/src/utils/PersistentFifo.cc index 01c8cec..406d5b8 100644 --- a/src/utils/PersistentFifo.cc +++ b/src/utils/PersistentFifo.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include "types.h" #include "global.h" @@ -49,7 +49,7 @@ PersistentFifo::PersistentFifo (bool reload, char *baseName) { fout = 0; } if (fin == fout && fin != 0) { - cerr << "previous crawl was too little, cannot reload state\n" + std::cerr << "previous crawl was too little, cannot reload state\n" << "please restart larbin with -scratch option\n"; exit(1); } @@ -204,7 +204,7 @@ char *PersistentFifo::readLine () { case -1 : // We have a trouble here if (errno != EINTR) { - cerr << "Big Problem while reading (persistentFifo.h)\n"; + std::cerr << "Big Problem while reading (persistentFifo.h)\n"; perror("reason"); assert(false); } else { diff --git a/src/utils/connexion.cc b/src/utils/connexion.cc index 2a07f6f..de9be9a 100644 --- a/src/utils/connexion.cc +++ b/src/utils/connexion.cc @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "options.h" diff --git a/src/utils/debug.cc b/src/utils/debug.cc index ba578ca..9b82714 100644 --- a/src/utils/debug.cc +++ b/src/utils/debug.cc @@ -2,7 +2,7 @@ // Sebastien Ailleret // 15-11-99 -> 03-04-01 -#include +#include #include "options.h" diff --git a/src/utils/hashDup.cc b/src/utils/hashDup.cc index 78520ca..3051b37 100644 --- a/src/utils/hashDup.cc +++ b/src/utils/hashDup.cc @@ -4,7 +4,7 @@ #include "config.h" -#include +#include #include #include #include @@ -28,7 +28,7 @@ hashDup::hashDup (ssize_t size, char *init, bool scratch) { } else { int fds = open(init, O_RDONLY); if (fds < 0) { - cerr << "Cannot find " << init << ", restart from scratch\n"; + std::cerr << "Cannot find " << init << ", restart from scratch\n"; for (ssize_t i=0; i } @@ -37,7 +37,7 @@ hashDup::hashDup (ssize_t size, char *init, bool scratch) { while (sr < size) { ssize_t tmp = read(fds, table+sr, size-sr); if (tmp <= 0) { - cerr << "Cannot read " << init << "\n"; + std::cerr << "Cannot read " << init << "\n"; exit(1); } else { sr += 8*tmp; diff --git a/src/utils/mypthread.cc b/src/utils/mypthread.cc index de7aeb3..d622c3f 100644 --- a/src/utils/mypthread.cc +++ b/src/utils/mypthread.cc @@ -2,7 +2,7 @@ // Sebastien Ailleret // 07-12-01 -> 07-12-01 -#include +#include #include #include "utils/mypthread.h" @@ -17,7 +17,7 @@ void startThread (StartFun run, void *arg) { || pthread_create(&t, &attr, run, arg) != 0 || pthread_attr_destroy(&attr) != 0 || pthread_detach(t) != 0) { - cerr << "Unable to launch a thread\n"; + std::cerr << "Unable to launch a thread\n"; exit(1); } } diff --git a/src/utils/string.cc b/src/utils/string.cc index e8935e4..e3ec266 100644 --- a/src/utils/string.cc +++ b/src/utils/string.cc @@ -3,7 +3,7 @@ // 20-12-99 -> 10-12-01 #include -#include +#include #include "options.h" diff --git a/src/utils/text.cc b/src/utils/text.cc index 96670f4..0814d6f 100644 --- a/src/utils/text.cc +++ b/src/utils/text.cc @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/utils/webserver.cc b/src/utils/webserver.cc index c9ab615..f298599 100644 --- a/src/utils/webserver.cc +++ b/src/utils/webserver.cc @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -56,8 +56,8 @@ void *startWebserver (void *none) { || setsockopt(fds, SOL_SOCKET, SO_REUSEADDR, (char*)&nAllowReuse, sizeof(nAllowReuse)) || bind(fds, (struct sockaddr *) &addr, sizeof(addr)) != 0 || listen(fds, 4) != 0) { - cerr << "Unable to get the socket for the webserver (" << global::httpPort - << ") : " << strerror(errno) << endl; + std::cerr << "Unable to get the socket for the webserver (" << global::httpPort + << ") : " << strerror(errno) << std::endl; exit(1); } // answer requests @@ -67,7 +67,7 @@ void *startWebserver (void *none) { uint len = sizeof(addr); fdc = accept(fds, (struct sockaddr *) &addrc, &len); if (fdc == -1) { - cerr << "Trouble with web server...\n"; + std::cerr << "Trouble with web server...\n"; } else { manageAns(fdc, readRequest(fdc)); close(fdc); [/code] |
原文: http://qtchina.tk/?q=node/310 |
Powered by zexport
|