got some errors with gcc 4.3.1. used options: --enable-extra --disable-perl.
include paths are censored :-P
g++ -I/usr/xxx -I/usr/lxx -I/usr/xx/include -I/usr/xx/include -O3 -D_FORTIFY_SOURCE=2 -O2 -DHAVE_IPV6 -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -DHAVE_LSTAT -DHAVE_LIBSSL -D_MODULES -D_MODDIR_="/usr/local/znc/lib/znc" -D_DATADIR_="/usr/local/znc/share/znc" -c -o main.o main.cpp -MMD -MF .depend/main.o.dep
main.cpp:14: error: 'no_argument' was not declared in this scope
main.cpp:15: error: 'no_argument' was not declared in this scope
main.cpp:16: error: 'no_argument' was not declared in this scope
main.cpp:17: error: 'no_argument' was not declared in this scope
main.cpp:18: error: 'no_argument' was not declared in this scope
main.cpp:19: error: 'no_argument' was not declared in this scope
main.cpp:20: error: 'no_argument' was not declared in this scope
main.cpp:21: error: 'no_argument' was not declared in this scope
main.cpp:23: error: 'no_argument' was not declared in this scope
main.cpp:25: error: 'required_argument' was not declared in this scope
main.cpp:27: error: elements of array 'const option g_LongOpts []' have incomplete type
main.cpp:27: error: storage size of 'g_LongOpts' isn't known
main.cpp: In function 'int main(int, char**)':
main.cpp:96: error: 'getopt_long' was not declared in this scope
gmake: *** [main.o] Error 1
tried multiple versions down to 0.6.x. all had that error.
any help is welcome & thanks in advance :-)
hi,
got some errors with gcc 4.3.1. used options: --enable-extra --disable-perl.
include paths are censored :-P
---
g++ -I/usr/xxx -I/usr/lxx -I/usr/xx/include -I/usr/xx/include -O3 -D_FORTIFY_SOURCE=2 -O2 -DHAVE_IPV6 -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -DHAVE_LSTAT -DHAVE_LIBSSL -D_MODULES -D_MODDIR_=\"/usr/local/znc/lib/znc\" -D_DATADIR_=\"/usr/local/znc/share/znc\" -c -o main.o main.cpp -MMD -MF .depend/main.o.dep
main.cpp:14: error: 'no_argument' was not declared in this scope
main.cpp:15: error: 'no_argument' was not declared in this scope
main.cpp:16: error: 'no_argument' was not declared in this scope
main.cpp:17: error: 'no_argument' was not declared in this scope
main.cpp:18: error: 'no_argument' was not declared in this scope
main.cpp:19: error: 'no_argument' was not declared in this scope
main.cpp:20: error: 'no_argument' was not declared in this scope
main.cpp:21: error: 'no_argument' was not declared in this scope
main.cpp:23: error: 'no_argument' was not declared in this scope
main.cpp:25: error: 'required_argument' was not declared in this scope
main.cpp:27: error: elements of array 'const option g_LongOpts []' have incomplete type
main.cpp:27: error: storage size of 'g_LongOpts' isn't known
main.cpp: In function 'int main(int, char**)':
main.cpp:96: error: 'getopt_long' was not declared in this scope
## gmake: **\* [main.o] Error 1
tried multiple versions down to 0.6.x. all had that error.
any help is welcome & thanks in advance :-)
<!-- github-sync-id:698936 -->
Which system is this on? I'd guess this is Solaris 9 or worse because that's the only system that I know which is broken enough not to have getopt_long.
See http://en.znc.in/wiki/Portability
Which system is this on? I'd guess this is Solaris 9 or worse because that's the only system that I know which is broken enough not to have getopt_long.
See http://en.znc.in/wiki/Portability
<!-- github-comment-id:910093 -->
Added Irix to the "broken" list in the wiki. getopt_long is a GNU extension, so... yeah. But I really like long options. :-(
I googled a getopt_long implementation and the file has 540 lines. That's a lot.
So plan B:
Grab a text editor and edit main.cpp. Remove the "g_LongOpts" array in lines 13 to 27. In line 117/119, change the calls to getopt_long(argc, argv, , g_LongOpts, &iOptIndex) into getopt(arc, argv, ).
If you got any problems with that, tell me which version of znc you are looking at and I'll patch main.cpp for you. (And yes, this will remove support for long options like --foreground and --debug from znc and make only the short forms like -f and -D work).
Added Irix to the "broken" list in the wiki. getopt_long is a GNU extension, so... yeah. But I really like long options. :-(
I googled a getopt_long implementation and the file has 540 lines. That's a lot.
So plan B:
Grab a text editor and edit main.cpp. Remove the "g_LongOpts" array in lines 13 to 27. In line 117/119, change the calls to getopt_long(argc, argv, <string>, g_LongOpts, &iOptIndex) into getopt(arc, argv, <string>).
If you got any problems with that, tell me which version of znc you are looking at and I'll patch main.cpp for you. (And yes, this will remove support for long options like --foreground and --debug from znc and make only the short forms like -f and -D work).
<!-- github-comment-id:911665 -->
fantastic!!
will give it a try right away!
and i couldn't care less about long options anyway :-)
i'll try 0.096 first but wouldn't mind any other version either
fantastic!!
will give it a try right away!
and i couldn't care less about long options anyway :-)
i'll try 0.096 first but wouldn't mind any other version either
<!-- github-comment-id:912030 -->
okay, that worked like a charm but one more issue came up:
Csocket.cpp: In function 'void __Perror(const CString&, const char*, unsigned int)':
Csocket.cpp:495: error: 'strerror_r' was not declared in this scope
okay, that worked like a charm but one more issue came up:
Csocket.cpp: In function 'void __Perror(const CString&, const char*, unsigned int)':
Csocket.cpp:495: error: 'strerror_r' was not declared in this scope
<!-- github-comment-id:912230 -->
http://predef.sourceforge.net/preos.html says that irix can be identified via #ifdef sgi, so could you change line 489 in Csocket.cpp from
#if defined(sun) || defined(_WIN32) || (defined(__NetBSD_Version) && NetBSD_Version < 4000000000)
into
#if defined(sgi) || defined(sun) || defined(_WIN32) || (defined(__NetBSD_Version) && NetBSD_Version < 4000000000)
http://predef.sourceforge.net/preos.html says that irix can be identified via `#ifdef sgi`, so could you change line 489 in Csocket.cpp from
#if defined(**sun) || defined(_WIN32) || (defined(__NetBSD_Version**) && **NetBSD_Version** < 4000000000)
into
#if defined(sgi) || defined(**sun) || defined(_WIN32) || (defined(__NetBSD_Version**) && **NetBSD_Version** < 4000000000)
<!-- github-comment-id:912708 -->
that worked just as well as the solution before!
had to replace install.sh with a real one and all was fine. now i'm the proud owner of a nice and current znc package for irix :-)
i have to say this was the best support i got in years. normally it's like that: "what? not linux? don't care." :-P
I'll forward the change to Csocket.cpp the right person.
So you do know that irix is dead since almost 5 years? Good. :-)
For the getopt_long problem I did a proper patch which has the same effect as the one you got, but with the difference that we still use getopt_long() if it is available:
http://git.znc.in/?p=psychon/znc.git;a=commitdiff;h=2afe2a77629012b24d8d270437e94e98d1657ffc
I'll forward the change to Csocket.cpp the right person.
<!-- github-comment-id:913056 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
hi,
got some errors with gcc 4.3.1. used options: --enable-extra --disable-perl.
include paths are censored :-P
g++ -I/usr/xxx -I/usr/lxx -I/usr/xx/include -I/usr/xx/include -O3 -D_FORTIFY_SOURCE=2 -O2 -DHAVE_IPV6 -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -DHAVE_LSTAT -DHAVE_LIBSSL -D_MODULES -D_MODDIR_="/usr/local/znc/lib/znc" -D_DATADIR_="/usr/local/znc/share/znc" -c -o main.o main.cpp -MMD -MF .depend/main.o.dep
main.cpp:14: error: 'no_argument' was not declared in this scope
main.cpp:15: error: 'no_argument' was not declared in this scope
main.cpp:16: error: 'no_argument' was not declared in this scope
main.cpp:17: error: 'no_argument' was not declared in this scope
main.cpp:18: error: 'no_argument' was not declared in this scope
main.cpp:19: error: 'no_argument' was not declared in this scope
main.cpp:20: error: 'no_argument' was not declared in this scope
main.cpp:21: error: 'no_argument' was not declared in this scope
main.cpp:23: error: 'no_argument' was not declared in this scope
main.cpp:25: error: 'required_argument' was not declared in this scope
main.cpp:27: error: elements of array 'const option g_LongOpts []' have incomplete type
main.cpp:27: error: storage size of 'g_LongOpts' isn't known
main.cpp: In function 'int main(int, char**)':
main.cpp:96: error: 'getopt_long' was not declared in this scope
gmake: *** [main.o] Error 1
tried multiple versions down to 0.6.x. all had that error.
any help is welcome & thanks in advance :-)
Which system is this on? I'd guess this is Solaris 9 or worse because that's the only system that I know which is broken enough not to have getopt_long.
See http://en.znc.in/wiki/Portability
hehe, irix actually
Added Irix to the "broken" list in the wiki. getopt_long is a GNU extension, so... yeah. But I really like long options. :-(
I googled a getopt_long implementation and the file has 540 lines. That's a lot.
So plan B:
Grab a text editor and edit main.cpp. Remove the "g_LongOpts" array in lines 13 to 27. In line 117/119, change the calls to getopt_long(argc, argv, , g_LongOpts, &iOptIndex) into getopt(arc, argv, ).
If you got any problems with that, tell me which version of znc you are looking at and I'll patch main.cpp for you. (And yes, this will remove support for long options like --foreground and --debug from znc and make only the short forms like -f and -D work).
fantastic!!
will give it a try right away!
and i couldn't care less about long options anyway :-)
i'll try 0.096 first but wouldn't mind any other version either
okay, that worked like a charm but one more issue came up:
Csocket.cpp: In function 'void __Perror(const CString&, const char*, unsigned int)':
Csocket.cpp:495: error: 'strerror_r' was not declared in this scope
http://predef.sourceforge.net/preos.html says that irix can be identified via
#ifdef sgi, so could you change line 489 in Csocket.cpp from#if defined(sun) || defined(_WIN32) || (defined(__NetBSD_Version) && NetBSD_Version < 4000000000)
into
#if defined(sgi) || defined(sun) || defined(_WIN32) || (defined(__NetBSD_Version) && NetBSD_Version < 4000000000)
that worked just as well as the solution before!
had to replace install.sh with a real one and all was fine. now i'm the proud owner of a nice and current znc package for irix :-)
i have to say this was the best support i got in years. normally it's like that: "what? not linux? don't care." :-P
and for what it's worth the patch:
--- main.cpp_O Thu Mar 24 17:15:38 2011
+++ main.cpp Thu Mar 24 14:02:17 2011
@@ -10,21 +10,6 @@
#include <getopt.h>
#include <sys/wait.h>
-static const struct option g_LongOpts[] = {
-#ifdef HAVE_LIBSSL
-#endif /* HAVE_LIBSSL */
-};
static void GenerateHelp(const char *appname) {
CUtils::PrintMessage("USAGE: " + CString(appname) + " [options]");
@@ -114,9 +99,9 @@
#ifdef HAVE_LIBSSL
bool bMakePem = false;
#else
#endif /* HAVE_LIBSSL */
switch (iArg) {
case 'h':
--- Csocket.cpp_O Thu Mar 24 17:15:38 2011
+++ Csocket.cpp Thu Mar 24 17:00:39 2011
@@ -487,7 +487,7 @@
void *Perror( const CS_STRING & s, const char pszFile, unsigned int iLineNo )
{
-#if defined(__sun) || defined(_WIN32) || (defined(__NetBSD_Version) && NetBSD_Version < 4000000000)
+#if defined(sgi) || defined(sun) || defined(_WIN32) || (defined(__NetBSD_Version) && NetBSD_Version < 4000000000)
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): " << strerror( GetSockError() ) << endl;
#else
char buff[512];
So you do know that irix is dead since almost 5 years? Good. :-)
For the getopt_long problem I did a proper patch which has the same effect as the one you got, but with the difference that we still use getopt_long() if it is available:
http://git.znc.in/?p=psychon/znc.git;a=commitdiff;h=2afe2a77629012b24d8d270437e94e98d1657ffc
I'll forward the change to Csocket.cpp the right person.
hehe, i do, still love it tho (and the resp. machines).
thanks for all !!