Date: Wed, 18 May 2005 18:31:07 +0800 From: Xu Qiang <Qiang.Xu@fujixerox.com> To: Ted Mittelstaedt <tedm@toybox.placo.com>, Dan Nelson <dnelson@allantgroup.com>, Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: freebsd-questions@freebsd.org Subject: RE: The availability of socketbits.h? Message-ID: <20050518102139.0C1811D936@imss.sgp.fujixerox.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Ted Mittelstaedt wrote: > Would you post a diff of the files you had to change to the list once > you get it running? With the help of Giorgos, I finally got all the diff into separate patch files. Explanatory notes: 1. I am using mlrate-1.1.0.tar.gz and nngs-1.1.14.tar.gz (coz it is more stable and reliable than 1.1.16 version), and only nngs-1.1.14.tar.gz need to be patched. 2. configure.patch must be applied in order to compile nngs src in FreeBSD 5.3 (for i386) with gcc 3.4.2; the patch is hinted by this bug reported in sourceforge: http://sourceforge.net/tracker/index.php?func=detail&aid=1201565&group_id=59572&atid=491424 For your convenience, the gist is listed here: ----------------------------------------------- -lang-c89 deprecated quote from man gcc (3.3.5-20050130) Note: Previous versions of cpp accepted a -lang option which selected both the language and the standards conformance level. This option has been removed, because it conflicts with the -l option. just use -std=c89 (not sure but seem to works) ----------------------------------------------- P.S.: Although this can work, I can't find the option "-std" in "man gcc", quite strange. Any hints? 3. Up to now, the compilation can be done successfully with GNU make, but if the following patch(es) is/are not applied, the compiled binary (nngssrv) will throw a run-time error and dump core. The patches are credited to Dan Nelson and Giorgos Keramidas. Either one set of the patches is enough to avoid the run-time error. Which one to choose is up to your own. i) The patch of Dan Nelson involves only one file - command.c, and the patch file is command.c.patch.DanNelson ii) The patch of Giorgos involves two files - command.c and command_list.h, the patch files are command.c.patch.GiorgosKeramidas and command_list.h.patch.GiorgosKeramidas If you meet any other problem in the process of setting up the server, pls let us know. P.S.: After using Giorgos' method to create the diff patches, I don't know how to apply the patches back to the original file(s). Can Giorgos help me once more? (Actually, I am quite a newbie in FreeBSD world.) 4. Final word: when configure nngs src, it is best to enable adminlevels options, it is done by: ./configure --prefix=<your_install_dir> --enable-adminlevels Hope this open-source software can be integrated into "ports" system of FreeBSD. Thank you, all. Regards, Xu Qiang [-- Attachment #2 --] --- command.c.org Wed May 18 18:04:10 2005 +++ command.c Wed May 18 18:11:41 2005 @@ -1142,7 +1142,7 @@ fclose(fp); return; } - for(i=0; command_list[i].comm_name; i++) { + for(i=0; i<noofcomms; i++) { if (command_list[i].adminLevel >= ADMIN_ADMIN) { fprintf(afp, "%s\n", command_list[i].comm_name); } else { [-- Attachment #3 --] --- command.c.org Wed May 18 18:04:10 2005 +++ command.c Wed May 18 18:15:44 2005 @@ -208,7 +208,7 @@ { if (!noofcomms) { - noofcomms = COUNTOF(command_list); + noofcomms = COUNTOF(command_list) - 1; qsort(&(command_list),noofcomms,sizeof command_list[0],&command_cmp); } } [-- Attachment #4 --] --- command_list.h.org Wed May 18 18:04:22 2005 +++ command_list.h Wed May 18 18:16:28 2005 @@ -242,6 +242,7 @@ #endif /* by Syncanph */ {"shownote", "", com_shownote, ADMIN_USER }, + {0, 0, 0, 0 } }; struct alias_type g_alias_list[] = { [-- Attachment #5 --] --- configure.org Wed May 18 14:00:31 2005 +++ configure Wed May 18 14:01:31 2005 @@ -5231,8 +5231,8 @@ NO_WARNINGS="CFLAGS=$CFLAGS" if test $ac_cv_c_compiler_gnu = yes; then GCC_ONLY='' - GGO_SOME_WARNINGS='-Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wp,-lang-c89' - GGO_ALL_WARNINGS='-Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wp,-lang-c89' + GGO_SOME_WARNINGS='-Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wp,-std=c89' + GGO_ALL_WARNINGS='-Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wp,-std=c89' NNGS_SOME_WARNINGS="CFLAGS=$CFLAGS $GGO_SOME_WARNINGS" NNGS_ALL_WARNINGS="CFLAGS=$CFLAGS $GGO_ALL_WARNINGS" CFLAGS="$CFLAGS $GGO_SOME_WARNINGS"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050518102139.0C1811D936>
