Re: src builds and STDERR
Hello! On Fri, Mar 2, 2012 at 1:24 PM, Eygene Ryabinkin r...@freebsd.org wrote: Thu, Mar 01, 2012 at 09:38:06AM -0800, Garrett Cooper wrote: On Thu, Mar 1, 2012 at 9:01 AM, Chris Rees utis...@gmail.com wrote: On 1 Mar 2012 16:31, Garrett Cooper yaneg...@gmail.com wrote: See: http://lists.freebsd.org/pipermail/freebsd-current/2011-December/029852.html . Why this patch is still not in FreeBSD proper, I do not know. [...] bin/165589 -- thanks! The patch from mailing list was already committed to HEAD more than 2 weeks ago, http://svnweb.freebsd.org/base?view=revisionrevision=231544 Don't see the MFC timeline, though. Max, any plans for MFC? JFYI: I MFC'ed Garret's patch to RELENG_9 several days ago. Max ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: arcnet support for FreeBSD (request for review)
hi, there! On Wed, Sep 26, 2001 at 12:59:01PM -0500, mark tinguely wrote: There is nothing like raising a topic that was last seen several months ago, but ... Has there been any serious consideration to committing the arcnet code that mentioned on 20 Jul 2001 (http://iclub.nsu.ru/~fjoe/arcnet/)? yes, I am working on this /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: gethostbyXXXX_r()
hi, there! On Sat, 4 Aug 2001, Richard Seaman, Jr. wrote: There are some gethostby_r, getnetby_r, ... etc routines in the linuxthreads port (/usr/ports/devel/linuxthreads/files). These came from the original linuxthreads package, and have no copyright on them. I never researched the copyright status of them, but I don't think they are GPL, though you might want to do further research on their history if you use them. gethostbyxxx_r can be taken from bind 8 /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: arcnet support for FreeBSD (request for review)
hi, there! On Thu, 19 Jul 2001, Marc wrote: I believe there is also 16 and 100 Mbit arcnet hardware available ;) That's just plain scary ;-) Although I guess Arcnet does have it's niche applications. yes. it is often used as solution for last mile problem and people ask for Arcnet drivers because they do not want to install Linux box for that /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
arcnet support for FreeBSD (request for review)
hi, there! I have made second attempt to implement Arcnet support for FreeBSD (the first was made about two years ago and nothing was ever committed) Current bits can be fetched from http://iclub.nsu.ru/~fjoe/arcnet/ In order to use them you should copy dev/, net/ and modules/ to /sys and apply patches from diffs/ if you are running -current or from diffs-stable/ if you are running stable. The most important part is changes to FreeBSD ARP stuff to support link addresses of length != 6 bytes. Both the driver for SMC 90Cx6 adapters and ARP stuff were ported from NetBSD. At this time I tried to make changes to if_ether.c less intrusive (it is not direct port of NetBSD's if_arp.c). The driver is interoperable with Linux Arcnet drivers and works in RFC1201 and RFC1056 modes. I get about 200K via FTP between -stable and -current machines and now trying to build XFree86 3.3.6 on NFS-mounted ports tree. Any feedback is HIGHLY appreciated. Thanks! /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: FreeBSD Mall now BSDCentral
hi, there! On Thu, 12 Jul 2001, David O'Brien wrote: 3) The default in 4.3-RELEASE is to have the IDE write caching off. If you submit a patch to add the proper entries to /boot/loader.conf in the MFSROOT image, I'd commit it. This would ensure the installation process always runs with write cashing on. write caching is on by default (again) in RELENG_4 since 2001/05/31 /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
openssl/mdX.h and mdX.h name clashes
hi, there! /usr/include/mdX.h and /usr/include/openssl/mdX.h both declare structures and functions with the same name (structures are a bit different) and this is a bit troublesome for applications that want to link with both -lmd and -lcrypto can we consider merging our mdX.h enhancements (MD5End, MD5File) to openssl and switching to openssl/mdX.h entirely? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: openssl/mdX.h and mdX.h name clashes
hi, there! On Mon, 2 Apr 2001, Peter Pentchev wrote: /usr/include/mdX.h and /usr/include/openssl/mdX.h both declare structures and functions with the same name (structures are a bit different) and this is a bit troublesome for applications that want to link with both -lmd and -lcrypto can we consider merging our mdX.h enhancements (MD5End, MD5File) to openssl and switching to openssl/mdX.h entirely? I believe that this is the way things are supposed to happen; this has been discussed on -arch recently, although somebody stated that OpenSSL already has all the functionality. I wasn't quite able to find analogous functions in the source; and a single function, without setting up a BIO object and stuff, when all you need is the MD5 hash of a file by name, is definitely something useful. Thanks for the pointer. I'll go read archives. I have already noticed that function names are different (underscores) but the problem remains for compilation time. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: GCC Upgrade?
hi, there! On Tue, 20 Mar 2001, Alexander N. Kabaev wrote: It will happen right after I MFC GCC 2.95.3. DWARF2 is required by the IA-64 psABI, and is supported better on the Alpha. It will be so nice to finally leave these sjlj exceptions problems behind. Btw, do you have patches that fix sjlj exceptions for 2.95.3? At this time we use 4.2-STABLE + gcc 2.95.2 + your fixes for sjlj in 2.95.2 for C++ development. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: SCSI-over-* hacks
hi, there! On Tue, 20 Mar 2001, Mike Smith wrote: Has anyone implemented/thought of implementing: - a CAM transport for ATAPI devices; Yes. It's not a lot of work. that would be GREAT for cd recording on IDE CD-RW (one will be able to use cdrdao and cdrecord instead of burncd) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: GCC Upgrade?
hi, there! On Tue, 20 Mar 2001, Titus von Boxberg wrote: Is there a link available to documentation that explains DWARF and fsjlf except.c from gcc sources (/usr/src/contrib/gcc/except.c) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: gcc -pthread / segfault problem
hi, there! On Fri, 2 Mar 2001, Lists Account wrote: I was coding some stuff under a 4.2 box of mine here earlier today and I seem to have hit a very strange bug, I was wondering if anyone could help me out here. I wrote a bunch of pthread enabled code, when I tried to run the program, after I compiled it with -pthread (I had to with the threading code in there), it segfaulted, so I ran it through gdb, and it was segfaulting on malloc(). So I dug around some more, and eventually I tried changing that single line to a c++ new() call, no more problems... 4.2-RELEASE has known problems with C++ and pthreads please upgrade to latest -STABLE /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
swap_pager: indefinite wait buffer: device: #ad/0x20001, blkno: 288,size: 4096
hi, there! what does the following error message mean: swap_pager: indefinite wait buffer: device: #ad/0x20001, blkno: 288, size: 4096 it happens when burncd is fixating disk /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: need help with pthreads and memory corruption problem
hi, there! On Tue, 23 Jan 2001, Joe Albowicz wrote: I'm porting an application from Linux to FreeBSD and I am having some problems with the program crashing in weird/random places because of memory corruption. For example the crash can happen in STL or free or in c++ code that we have written (note that our code works just fine on Linux for extended periods of time under heavy load). The application consists of a main process plus a few dozen pthreads written in c++. The only changes that I have made in porting from Linux to FreeBSD consisted of Makefile changes (e.g. using -D_THREAD_SAFE) and I replaced "new" with malloc in code that is excuted by the pthreads [except STL may call new?]. Replacing new with malloc definately helped, but I'm not sure why. [...] FreeBSD 4.2-RELEASE FreeBSD 4.2-RELEASE #0 please upgrade to latest -stable. there have been problems with C++ and threads in 4.2-RELEASE and they have been fixed recently /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: gdb question
hi, there! On Wed, 3 Jan 2001, Thierry wrote: I use the "fork" function to call another function "foo( )" In gdb, I would like to put a breakpoint in this function "foo( )", When I execute, the function "foo( )" is stopped, but gdb doesn't give me the hand. How I can put a breakpoint in a function call by a "fork" system ? set follow-fork-mode /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: call for testers: nsswitch + dynamic linking
hi, there! On Wed, 25 Oct 2000, Jacques A. Vidrine wrote: nsswitch extends the C library so that arbitrary sources may be consulted by database routines such as getpwent, gethostbyname, and so on. This implementation was based on NetBSD's implementation. I have enhanced it to make the interfaces thread safe, and to provide support for dynamically loaded nsswitch modules. Patches for 4-STABLE and 5-CURRENT are at: http://www.nectar.com/freebsd/nsswitch. Also available there are patches for PADL.COM's nss_ldap so that it may be used with FreeBSD. Incidentally this also adds reentrant versions of common routines such as getpwnam_r. Note that routines that eventually call the resolver are only as thread safe as the resolver -- i.e. not really. bind 8 has nearly-thread-safe libresolv (only res_debug.c functions are not thread-safe) and this with your NSS patches will give us thread-safe (at least IPv4) resolver. any plans to merge libresolv from bind 8? btw when do you plan to MFC NSS stuff? thanks, /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
ACE wrappers
hi, there! Is there anyone using ACE wrappers? We are using -stable and before 4.2-RELEASE everything was fine (on systems running 4.2-BETA before libc_r fixes/improvements) On -stable systems cvsupped yesterday a lot of ACE tests fail with signal 11 (we are using ACE wrappers 5.1.9). Is there anyone experiencing the same problems? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: mortal mount
hi, there! On Mon, 4 Dec 2000, Will Andrews wrote: I spotted this PR in the database today: http://www.freebsd.org/cgi/query-pr.cgi?pr=11031 I'd like to know: why can't our mount optionally allow configuration of non-root mounting to a fixed mountpoint? This patch (obviously, it will need to be updated to sync with the current tree) seems fairly straightforward and its style matches the current tree pretty well. I don't see any reason not to put it in the tree. what's wrong with 'sysctl -w vfs.usermount=1'? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: IM server?
hi, there! On Tue, 28 Nov 2000, Mike Nowlin wrote: Anyone know of a program out there that can act as a central server for ICQ? (I know there's some AIM clones out there, but I'd rather avoid that one...) A quick look in ports and some digging around on Google and Freshmeat didn't return much. http://www.icq.khstu.ru/unix/download/IServerd-0.8.2.tar.gz their homepage is at http://www.icq.khstu.ru/unix/ (sorry, no english version) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: dlopen()
hi, there! On Wed, 22 Nov 2000, Dmitry Sychov wrote: Is it safe to remove the *.so file after it is loaded into the process space and addresses to its functions are gotten? yes /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: daemon()
hi, there! On Wed, 8 Nov 2000, Koster, K.J. wrote: No one with any brains uses bash 1 for anything anymore. Then why is it there? To help up the port count? If it's not good, it should be nuked, IMHO. people still use it because it is smaller obrien has already tried to remove it once (in Mar 1999) as for me -- I do not try to hunt bugs in bash1 and do not blame it. my question was about unclosed pipe /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: daemon()
hi, there! On Wed, 8 Nov 2000, Don Lewis wrote: } No one with any brains uses bash 1 for anything } anymore. } } Then why is it there? To help up the port count? If it's not good, it should } be nuked, IMHO. } } people still use it because it is smaller } obrien has already tried to remove it once (in Mar 1999) } } as for me -- I do not try to hunt bugs in bash1 and do not blame it. } my question was about unclosed pipe It appears to be a descriptor that your shell failed to close before execing your test program. Unless you do something out of the ordinary like run program 27somefile the shell should only leave three descriptors (0, 1, and 2 for stdin, stdout, and stderr) open when it execs another program. yes, I understand that. My point is that bash1 is still used and comments about braindead people who use it should be redirected to /dev/null. I think we should stop this thread. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
daemon()
hi, there! --- cut here --- #include stdio.h #include stdlib.h main() { if (daemon(1, 1) 0) { perror("daemon"); } for (;;) sleep(1); } --- cut here --- lark:~$ps ax | grep foo3 26102 ?? Ss 0:00.00 ./foo3 26104 p8 S+ 0:00.01 grep foo3 lark:~$fstat -p 26102 USER CMD PID FD MOUNT INUM MODE SZ|DV R/W fjoe foo3 26102 root / 2 drwxr-xr-x 512 r fjoe foo3 26102 wd /usr 16007 drwxr-xr-x8192 r fjoe foo3 26102 text /usr 16071 -rwxrwxr-x4574 r fjoe foo3 261020 / 5542 crw--w ttyp8 rw fjoe foo3 261021 / 5542 crw--w ttyp8 rw fjoe foo3 261022 / 5542 crw--w ttyp8 rw fjoe foo3 261024* pipe c9f1cde0 -0 0 rw lark:~$ what is FD 4? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: daemon()
hi, there! On Tue, 7 Nov 2000 [EMAIL PROTECTED] wrote: what is FD 4? I can't reproduce this? Does it always happen? yes. I am running sample program under FreeBSD 4.2-BETA (31 Oct 2000) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: daemon()
hi, there! On Tue, 7 Nov 2000, Don Lewis wrote: } what is FD 4? } } I can't reproduce this? Does it always happen? It might be something that the shell forgets to close, so it will be dependent on which shell you use. exactly. this does not happen if I run this program from tcsh (but does if I run from bash 1.14.7(1) built from ports thanks! /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: AutoFS on FreeBSD
hi, there! On Wed, 25 Oct 2000, Terry Lambert wrote: In any case, you *could* use the Linux AutoFS module with FreeBSD; there is a port which supports Linux FS modules loaded into user space which one? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: using raw disks in vmware under -current
hi, there! On Tue, 10 Oct 2000, Josef Karthauser wrote: Has anyone got rawdisks working in vmware under -current? They used to work - my guess that that something happened when we lost block devices, or I've got a hosed linux_compat installation. vmware2 port works for me with Win95 OSR2 installed on a raw device (FreeBSD 4.1-STABLE around Sep 2000) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Converting Sun Automounter maps
hi, there! On Fri, 22 Sep 2000, Daniel Eischen wrote: On Fri, 22 Sep 2000, Stephen Hocking wrote: I've stumbling into the wonderful world of auto-mounting, and trying to convert some maps from a Sun box to the FreeBSD format. I have amd.conf set up OK as per the man page, but keep on getting errors when changing into the relevant directorys (like amd can't find an appropriate match). Has anyone been down this path? Somewhat related to this... I've tried to get FreeBSD to behave with Sun automount home directories. When all the (Sun) home directories are on one system, I could get by by exporting the home directory on the Sun and automounting this as /home on the FreeBSD box. But we're now expanding so that home directories will exist on 2 different Sun boxen, and this will no longer work. I've resorted to disable automounting of users home directories on the Suns (where /home/user could be automounted to any Sun box/filesystem) and am now auotmounting /home/machinename instead. So home directories are /home/box1/user23 or /home/box2/user134. FreeBSD can now deal with this by automounting box1 and box2 under /home. amd-utils doesn't seem to support the autofs mapping needed to allow FreeBSD to exist in such an environment where each users home directory is automounted. I remember searching the newsgroups regarding this issue, and there did seem to be some initial support for autofs though. we do automounting user homes this way: --- cut here (amd.home amd map) --- /defaults type:=nfs;opts:=rw,vers=3,proto=tcp,intr,soft,nodevs,nosuid,rsize=8192,wsize=8192; # # master users ros host==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} oleghost==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} nik host==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} [...] sol host==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} ilnar host==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} eug host==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} paulhost==master;type:=link;fs:=/usr/home/${key} || rhost:=master;rfs:=/usr/home;sublink:=${key} # # biboca users al host==biboca;type:=link;fs:=/usr/home/${key} || rhost:=biboca;rfs:=/usr;sublink:=home/${key} # # lark users fjoehost==lark;type:=link;fs:=/usr/home/${key} || rhost:=lark;rfs:=/usr;sublink:=home/${key} # # tiamat users osyahost==tiamat;type:=link;fs:=/usr/home/${key} || rhost:=tiamat;rfs:=/usr;sublink:=home/${key} # # lizard users cs host==lizard;type:=link;fs:=/usr/home/${key} || rhost:=lizard;rfs:=/usr;sublink:=home/${key} # # xaa users xaa host==xaa;type:=link;fs:=/usr/home/${key} || rhost:=xaa;rfs:=/usr;sublink:=home/${key} # # drugon users als host==drugon;type:=link;fs:=/usr/home/${key} || rhost:=drugon;rfs:=/usr;sublink:=home/${key} blayhost==drugon;type:=link;fs:=/usr/home/${key} || rhost:=drugon;rfs:=/usr/home;sublink:=${key} plesk host==drugon;type:=link;fs:=/usr/home/${key} || rhost:=drugon;rfs:=/usr;sublink:=home/${key} --- cut here --- /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Trouble with dynamic loading of C++ libs in PHP v4.02 on FreeBSD 4.1
hi, there! On Fri, 15 Sep 2000, John Polstra wrote: Here is another possibility: we could call _thread_init() from crt1.o. The patch (untested) is below. It calls _thread_init() if and only if that symbol is defined -- i.e., libc_r is linked in. What do you think about this solution? Index: crt1.c === RCS file: /home/ncvs/src/lib/csu/i386-elf/crt1.c,v retrieving revision 1.4 diff -u -r1.4 crt1.c --- crt1.c1999/08/27 23:57:57 1.4 +++ crt1.c2000/09/16 00:30:51 @@ -48,6 +48,9 @@ extern int _DYNAMIC; #pragma weak _DYNAMIC +extern void _thread_init(void); +#pragma weak _thread_init + #ifdef __i386__ #define get_rtld_cleanup() \ ({ fptr __value; \ @@ -91,6 +94,8 @@ #ifdef GCRT monstartup(eprol, etext); #endif +if (_thread_init != NULL) + _thread_init(); _init(); exit( main(argc, argv, env) ); } seems ok to me but can we do this from `do_ctors' or `_init' -- they are located in common/ /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Trouble with dynamic loading of C++ libs in PHP v4.02 on FreeBSD 4.1
hi, there! On Fri, 15 Sep 2000, John Polstra wrote: there were some problems with pthreads initialization (but David will not like the way I did it -- some files in contrib/gcc should be changed). this happened because we initialize pthreads from static object constructor (which is not the right thing anyway). It seemed like a good idea at the time. :-) What is the problem -- is it that libc_r is initialized at the wrong time? What would you suggest as a better method for initializing the library? I'd hate to introduce a bunch of "if (!initted) { ... }" checks, since those add runtime overhead on every call. `__register_frame_info' should be called from `do_ctors' in src/lib/csu/common/crtbegin.c to load frame information from .eh_frame sections before any constructors are executed because try/catch can be used in constructors of static objects (`__register_frame_info' is defined in src/contrib/gcc/frame.c, this file is linked into libgcc[_r].a). however `__register_frame_info' uses locks and other threading stuff (using pthreads on FreeBSD) so we must have pthreads initialized before locks are used. another issue with our pthreads initialization is that pthreads can be used in static object constructors so the first `pthread_xxx' call can happen before `_thread_init' is called from constructor of our _thread_init_invoker (it depends on order in which constructors are placed in .ctors section). I see two solutions (both seem to be hacks for me): 1) we can insert if (!initted) ... in `pthread_once' (this seem to be the first pthreads function called from __register_frame_info) 2) we can insert #if __GTHREADS _thread_init(); #endif at the very beginning of `__register_frame_info' The second approach seems to be cleaner but require changes in src/contrib/gcc/ /fjoe PS I have attached patches and Makefile.inc which should be placed into src/lib/csu. Makefile.inc can be slightly out of date (I made it somewhere around May/Jun 2000) --- contrib/gcc/config/freebsd.h.orig Wed Jul 19 07:30:53 2000 +++ contrib/gcc/config/freebsd.hSun Jul 23 17:59:33 2000 @@ -137,12 +137,6 @@ #undef HANDLE_SYSV_PRAGMA #define HANDLE_SYSV_PRAGMA -/* FreeBSD ELF using our home-grown crtbegin.o/crtend.o does not support the - DWARF2 unwinding mechanisms. Once `make world' bootstraping problems with - the EGCS crtstuff.c is overcome, we will switch to the non-sjlj-exceptions - type exception machanism. */ -#define DWARF2_UNWIND_INFO 0 - /* Do not use ``thunks'' to implement C++ vtables. This method still has fatal bugs. Also, GCC 3.0 will have a new C++ ABI that may not even support `thunks'. */ --- contrib/gcc/frame.c.origMon Jul 24 00:29:25 2000 +++ contrib/gcc/frame.c Mon Jul 24 00:33:28 2000 @@ -725,6 +725,10 @@ void __register_frame_info (void *begin, struct object *ob) { +#if __GTHREADS + _thread_init(); +#endif + ob-fde_begin = begin; ob-pc_begin = ob-pc_end = 0; --- lib/csu/common/crtbegin.c.orig Mon Jul 10 16:15:25 2000 +++ lib/csu/common/crtbegin.c Mon Jul 24 00:36:25 2000 @@ -26,6 +26,9 @@ */ #include sys/param.h +#include "tm.h" +#include "defaults.h" +#include frame.h #define ABI_VENDOR "FreeBSD" #define ABI_SECTION".note.ABI-tag" @@ -33,13 +36,23 @@ typedef void (*fptr)(void); +extern void __register_frame_info(void *, struct object *) + __attribute__((weak)); +extern void *__deregister_frame_info(void *) + __attribute__((weak)); + static fptr ctor_list[1] __attribute__((section(".ctors"))) = { (fptr) -1 }; static fptr dtor_list[1] __attribute__((section(".dtors"))) = { (fptr) -1 }; +static char eh_frame_begin[] __attribute__((section(".eh_frame"))) = { }; static void do_ctors(void) { fptr *fpp; +static struct object object; + +if (__register_frame_info) + __register_frame_info(eh_frame_begin, object); for(fpp = ctor_list + 1; *fpp != 0; ++fpp) ; @@ -54,6 +67,9 @@ for(fpp = dtor_list + 1; *fpp != 0; ++fpp) (**fpp)(); + +if (__deregister_frame_info) + __deregister_frame_info(eh_frame_begin); } /* --- lib/csu/common/crtend.c.origMon Jul 10 16:15:28 2000 +++ lib/csu/common/crtend.c Sun Jul 23 17:59:33 2000 @@ -26,8 +26,11 @@ */ #include sys/cdefs.h +#include sys/types.h typedef void (*fptr)(void); static fptr ctor_end[1] __attribute__((section(".ctors"))) __unused = { 0 }; static fptr dtor_end[1] __attribute__((section(".dtors"))) __unused = { 0 }; +static u_int32_t eh_frame_end[1] __attribute__((section(".eh_frame"))) +__unused = { 0 }; TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb" GCC_ARCH= mips .else GCC_ARCH= ${TARGET_ARCH} .endif GCCDIR= ${.CURDIR}/../../../contrib/gcc
Re: Trouble with dynamic loading of C++ libs in PHP v4.02 on FreeBSD 4.1
hi, there! On Thu, 14 Sep 2000, John Polstra wrote: Also, we _desperately_ need to switch away from the setjmp/longjmp exception implementation and start using the now-standard DWARF2 implementation. It makes a tremendous performance difference even in programs that don't use exceptions at all. (I measured it once.) But that in turn requires more support from libgcc, and exacerbates the problems associated with using a non-shared libgcc. libgcc already has support for DWARF2. the only thing that should be changed is crtbegin.o/crtend.o. I have made all the necessary patches for this. I believe, David has them. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Trouble with dynamic loading of C++ libs in PHP v4.02 on FreeBSD 4.1
hi, there! On Thu, 14 Sep 2000, John Polstra wrote: I have made all the necessary patches for this. I believe, David has them. Actually I now think we should simply build the crt* files from gcc's "crtstuff.c" in the standard way, rather than having our own versions. The gcc versions are messy but they work fine, and they are specifically exempted from the GPL as long as they are used together with gcc. changes to crt* files to support DWARF2 are minimal, however. there were some problems with pthreads initialization (but David will not like the way I did it -- some files in contrib/gcc should be changed). this happened because we initialize pthreads from static object constructor (which is not the right thing anyway). there are some workarounds (to not change anything improted from vendor branch), of course. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Document about threads
hi, there! On Fri, 25 Aug 2000, Bryan K. Ogawa wrote: 1. I had seen an email in the mailing list archives which asserted that C++ exceptions have been broken since August 1999 in the multithread case -- does anyone know what the status in 4.1-STABLE and -CURRENT are? I've managed to get the code to compile under FreeBSD, but it crashes quite rapidly after this, and I'm wondering if it's because of an exception being thrown. This is under 4.1-RELEASE. this issue is unrelated to threads. FreeBSD stock g++ 2.95.2 compiler uses -fsjlj-exceptions mechanism for exception handling which is broken (g++ sometimes generates incorrect code even without any optimization options given). It is not FreeBSD-specific behaviour. gcc GNATS has bug report with similar gcc behaviour under OS/390. uou can still use /usr/ports/lang/egcs -- this is the same 2.95.2 but it uses DWARF2 unwinding info for exception handling -- the same mechanism that is used by default under Linux and (IIRC) Solaris. I believe that FreeBSD g++ will switch to this scheme in near future. I have initial set of patches that adds support to FreeBSD CRT startups for loading info from .eh_frame ELF sections needed for DWARF2 unwinding info mechanism to work. David O'Brien has all the information. I think he can shed some light on this issue (he is gcc/binutils maintainer) but he seems to be busy with other tasks -- I still haven't got any replies from him except "go ahead, it would be nice to have this feature" :) 2. Sometimes, the programs crash at startup, but not always. I seem to recall a recent discussion about the loader not being multi-thread safe -- was this fixed in time for 4.1-RELEASE ? yes, I beleive /fjoe PS you will also have problems with shared libraries debugging (see PR/20373). I have solution for this problem too. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Document about threads
hi, there! On Fri, 25 Aug 2000, Alexander N. Kabaev wrote: There was a bug in -fsjlj-exceptions code generation related to shared libraries and to best of my knowledge the correct fix has been imported into the official gcc CVS tree and was merged into FreeBSD some time ago. Are there any other errors you know about? If there are any simple code snippets which can demonstrate the problem, I am willing to investigate it further and see if it can be fixed. -fsjls-exceptions errors should be fixed regardless of whether FreeBSD is going to switch to DWARF scheme or not. 4.x-STABLE is here to stay for quite some time and I doubt that it will ever be changed to use DWARF unwinding. this is definitely not the case with shared libraries -- I know about that bug and the fix was merged to FreeBSD CVS source tree somewhere around beginning of this year. unfortunately I have no simple code snippets and have no time to investigate it further. but I have an application that demonstrates this bug: Reactor_Exceptions_Test from ACE wrappers (you can get ACE wrappers from http://www.cs.wustl.edu/~schmidt/). the test itself is quite simple snippet but you will need to build ACE to run it. please look at #413 and #258 in gcc GNATS. all that I found is that emitted setjmp got optimized during flow analysis stage in such way that when exception is raised execution continues in try { } block (yes, again) instead of place where decision is taken in which catch { } block the execution should be continued. I do not know about any other 2.95.2 bugs. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ANSI C Standard and wchar*
hi, there! On Tue, 1 Aug 2000, Thomas M. Sommers wrote: I am working on completing a BSDL'ed implementation of wchar* that is *not* broken. However, I could not find a free copy of ANSI C library standard. I was wondering if anyone has an electronic copy of ANSI/ISO/IEC 9899-1999 Programming Languages - C and the related POSIX documents. (Yes, the document only costs $18 on ANSI.org, but I really do not want to purchase something that I probably will not use again.) Also, which part of POSIX governs the correct behavior for wchar*? POSIX.1? I believe wchar is part of the C standard. You can get the draft standard for free from the ANSI site. Look for document N869. I think we should consider merging xpg4dl project (like NetBSD did some time ago) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: PATCH src/etc/root : more-less
hi, there! On Tue, 11 Jul 2000 [EMAIL PROTECTED] wrote: What about it for 4.0-ST? Index: src/etc/root/dot.cshrc [trim] and what's about this? --- usr.sbin/mergemaster/mergemaster.sh.origTue Jul 11 21:34:20 2000 +++ usr.sbin/mergemaster/mergemaster.sh Tue Jul 11 21:37:11 2000 @@ -114,23 +114,17 @@ echo " PAGER and EDITOR. Meanwhile, what would you like to do?" echo '' echo " Use 'e' to exit mergemaster and fix your PAGER variable" -if [ -x /usr/local/bin/less ]; then -echo " Use 'l' to set PAGER to /usr/local/bin/less for this run" -fi -echo " Use 'm' to use plain old 'more' as your PAGER for this run" +echo " Use 'l' to use 'less' as your PAGER for this run" echo '' -echo " Default is to use plain old 'more' " +echo " Default is to use 'less' " echo '' -read -p "What should I do? [Use 'more'] " FIXPAGER +read -p "What should I do? [Use 'less'] " FIXPAGER case "${FIXPAGER}" in [eE]*) exit 0 ;; -[lL]*) - PAGER=/usr/local/bin/less - ;; *) - PAGER=more + PAGER=less ;; esac echo '' @@ -139,11 +133,11 @@ esac # If user has a pager defined, or got assigned one above, use it. -# If not, use more. +# If not, use less. # -PAGER=${PAGER:-more} +PAGER=${PAGER:-less} -if [ -n "${VERBOSE}" -a ! "${PAGER}" = "more" ]; then +if [ -n "${VERBOSE}" -a ! "${PAGER}" = "less" ]; then echo " *** You have ${PAGER} defined as your pager so we will use that" echo '' sleep 3 @@ -495,7 +489,7 @@ rm "${COMPFILE}" else # Ok, the files are different, so show the user where they differ. Use user's - # choice of diff methods; and user's pager if they have one. Use more if not. + # choice of diff methods; and user's pager if they have one. Use less if not. # Use unified diffs by default. Context diffs give me a headache. :) # case "${AUTO_RUN}" in /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
latest news concerned crypto stuff
hi, there! do the latest news concerned crypto stuff mean that we can now always have DES in base system? and what's about a possibility to select Crypt Format (DES/MD5/SHA/whatever) per user or per login class? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
mbstowcs/wcstombs
hi, there! sorry for posting here but freebsd-i18n list seems to be dead (is it?) some products (e.g. Xerces for C from XML Apache Project) rely on the following behaviour of mbstowcs/wcstombs: when `dest' param is NULL then `len' parameter is ignored and these functions return required length to store the result. This feature is implemented at least in Solaris' libc and glibc 2.1.2. attached patch implements this behaviour (with updated man page and one minor fix in man 3 multibyte). btw is there ongoing effort to merge Citrus libxpg4 to our base tree? freebsd-i18n archives are empty. searching yields nothing except links to Citrus homepage and NetBSD `whatsnew' pages. /fjoe --- lib/libc/locale/ansi.c.orig Mon Jul 3 09:58:32 2000 +++ lib/libc/locale/ansi.c Mon Jul 3 10:05:29 2000 @@ -105,15 +105,21 @@ char const *e; int cnt = 0; - if (!pwcs || !s) + if (!s) return (-1); - while (n-- 0) { - *pwcs = sgetrune(s, MB_LEN_MAX, e); - if (*pwcs == _INVALID_RUNE) + while (!pwcs || n-- 0) { + wchar_t wc; + + wc = sgetrune(s, MB_LEN_MAX, e); + if (pwcs) + *pwcs = wc; + if (wc == _INVALID_RUNE) return (-1); - if (*pwcs++ == 0) + if (wc == 0) break; + if (pwcs) + pwcs++; s = e; ++cnt; } @@ -129,23 +135,30 @@ char *e; int cnt, nb; - if (!pwcs || !s || n INT_MAX) + if (!pwcs || (s n INT_MAX)) return (-1); nb = n; cnt = 0; - while (nb 0) { + while (!s || nb 0) { + char c[MB_LEN_MAX + 1]; + size_t c_cnt; + if (*pwcs == 0) { - *s = 0; + if (s) + *s = 0; break; } - if (!sputrune(*pwcs++, s, nb, e)) + if (!sputrune(*pwcs++, s ? s : c, s ? nb : MB_LEN_MAX, e)) return (-1);/* encoding error */ if (!e) /* too long */ return (cnt); - cnt += e - s; - nb -= e - s; - s = e; + c_cnt = s ? e - s : e - c; + cnt += c_cnt; + if (s) { + nb -= c_cnt; + s += c_cnt; + } } return (cnt); } --- lib/libc/locale/multibyte.3.origMon Jul 3 10:08:00 2000 +++ lib/libc/locale/multibyte.3 Mon Jul 3 10:20:50 2000 @@ -77,7 +77,7 @@ and code each basic element as a sequence of C .Va char Ns s . Individual basic elements may map into one or more -.Pq up to Dv MB_CHAR_MAX +.Pq up to Dv MB_LEN_MAX bytes in a multibyte character. .Pp The current locale @@ -176,6 +176,14 @@ .Fa nwchars wide characters are stored. A terminating null wide character is appended if there is room. +If +.Fa wcstring +is a null pointer, +.Fn mbstowcs +returns the length required to convert the entire array regardless +of the value of +.Fa nwchars , +but no values are stored. .Pp The .Fn wcstombs @@ -189,6 +197,14 @@ .Fa mbstring . Partial multibyte characters at the end of the string are not stored. The multibyte character string is null terminated if there is room. +If +.Fa mbstring +is a null pointer, +.Fn wcstombs +returns the length required to convert the entire array regardless +of the value of +.Fa nbytes , +but no values are stored. .Sh "RETURN VALUES If multibyte characters are not supported in the current locale, all of these functions will return \-1 if characters can be processed, @@ -216,11 +232,15 @@ .Pp The .Fn mbstowcs -function returns the number of wide characters converted, +function returns the number of wide characters converted (or required if +.Fa wcstring +is NULL), not counting any terminating null wide character. The .Fn wcstombs -function returns the number of bytes converted, +function returns the number of bytes converted (or required if +.Fa mbstring +is NULL), not counting any terminating null byte. If any invalid multibyte characters are encountered, both functions return \-1.
Re: mbstowcs/wcstombs
hi, there! On Mon, 3 Jul 2000, Max Khon wrote: sorry for posting here but freebsd-i18n list seems to be dead (is it?) some products (e.g. Xerces for C from XML Apache Project) rely on the following behaviour of mbstowcs/wcstombs: when `dest' param is NULL then `len' parameter is ignored and these functions return required length to store the result. This feature is implemented at least in Solaris' libc and glibc 2.1.2. attached patch implements this behaviour (with updated man page and one minor fix in man 3 multibyte). aargh, there is already opened PR for this (bin/17694) anyway the question is open /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ACE wrappers woes on 4.x-stable (pthreads)
hi, there! On Thu, 8 Jun 2000, Russell L. Carter wrote: |can someone take a look at this? |seems that it's a flaw in 4.x pthreads implementation |under RELENG_3 everything works fine, haven't tried this on -current |i'm totally lost at this point Multithreaded C++ exceptions have been broken since about August '99. Use the macros if you need exceptions with ACE/TAO. That's not a solution for me -- I want to port some app that uses ACE + TAO and does not use ACE exceptions macros. btw TAO/tests/Native_Exceptions_Test and that app work fine for me. however the Reactor_Exceptions_Test fails (SIGSEGV with stack smashed) and this makes me nervious. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ACE wrappers woes on 4.x-stable (pthreads)
hi, there! On Fri, 9 Jun 2000, Max Khon wrote: Multithreaded C++ exceptions have been broken since about August '99. Use the macros if you need exceptions with ACE/TAO. That's not a solution for me -- I want to port some app that uses ACE + TAO and does not use ACE exceptions macros. btw TAO/tests/Native_Exceptions_Test and that app work fine for me. however the Reactor_Exceptions_Test fails (SIGSEGV with stack smashed) and this makes me nervious. forgot to add: I need pointers to start digging around /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ACE wrappers woes on 4.x-stable (pthreads)
hi, there! On Thu, 8 Jun 2000, Soren Schmidt wrote: |can someone take a look at this? |seems that it's a flaw in 4.x pthreads implementation |under RELENG_3 everything works fine, haven't tried this on -current |i'm totally lost at this point Multithreaded C++ exceptions have been broken since about August '99. Use the macros if you need exceptions with ACE/TAO. That's not a solution for me -- I want to port some app that uses ACE + TAO and does not use ACE exceptions macros. btw TAO/tests/Native_Exceptions_Test and that app work fine for me. however the Reactor_Exceptions_Test fails (SIGSEGV with stack smashed) and this makes me nervious. Totally unrelated but I'm currently wrestling a very semilar looking problem with gcc-2.95.2 on (cough) AIX43. It seems that gcc has problems with exceptions on at least AIX and HPUX, it could be the same problem that is biting here... RELENG_3 does not have the problem I'm trying to hunt (with gcc 2.95.2 built from ports) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Using TCP_WRAPPERS in code
hi, there! On Sun, 4 Jun 2000, James Housley wrote: I would like to use tcp_wrappers (libwrap) in a program. I din't see any examples or a reference to a web site. I have read the man page. Is there a good example of a program in the FreeBSD 4 tree that is not inetd spawned and uses libwrap? /usr/src/usr.sbin/inetd /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RTLD_NODELETE, RTLD_NOLOAD dlopen mode flags
hi, there! Are there any plans to implement RTLD_NODELETE and RTLD_NOLOAD mode flags for dlopen? from Solaris 2.6 man 3X dlopen: The following modes provide additional capabilities outside of relocation processing: RTLD_NODELETE The specified object will not be deleted from the address space as part of a dlclose(). RTLD_NOLOAD The specified object is not loaded as part of the dlopen(), but a valid handle is returned if the object already exists as part of the process address space. Addi- tional modes can be specified and will be or'ed with the present mode of the object and its dependencies. The RTLD_NOLOAD mode provides a means of querying the presence, or promoting the modes, of an existing dependency. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: why JDK 1.1.8 on FreeBFS is so slow ?
hi, there! On Wed, 3 May 2000, Alexander Voropay wrote: see http://www.volano.com/report.html for details (quoting from their page) JDK 1.1.8 FreeBSD JDK 1.1.8 for FreeBSD FreeBSD 3.2-RELEASE Java version "jdk1.1.8-FreeBSD:1999/7/19" Installed from jdk1.1.8_ELF.V99-7-19.tar.gz (11,337,773 bytes). Uses user-level threads and no just-in-time compiler. Increased the per-process file descriptor limit to 4096 (from 1064) and the system-wide file descriptor limit to 8192 (from 1064) by using sysctl to modify the kern.maxfilesperproc and kern.maxfiles variables in /etc/rc.local. See our FreeBSD Support page for details. Blackdown JDK 1.1.7 for Linux does not have JIT too and shows nearly the same bad performance. The are several third-party JIT's you can to try (tya, openjit). /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Is FreeBSD dead ?
hi, there! On Fri, 10 Mar 2000, Didier Derny wrote: I've just read the announcement of the merge of BSDI and Walnut Creek CDROM. (March 10 2000). I guess it's a sad day for FreeBSD. I can't imagine how a company selling it's own BSD could at the same time let another BSD free. Has the FreeBSD project become the test-bed for BSDI ? or the single user evaluation of BSDI... Il FreeBSD dedicated to become the 'RedHat' of BSD (when you know the junk sold by redhat. I think it is time to think to something else NetBSD ? OpenBSD ? Linux (which one?) I've been using FreeBSD since August 1994 (FreeBSD 1.1.5.1) FUD /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: empty lists in for
hi, there! On Mon, 6 Mar 2000, Chet Ramey wrote: : to : : sh_subdirs=${SUBDIRS}; for f in $$sh_subdirs ; do ... there's lots of other workarounds, from seeing if SUBDIRS is defined, to using make's .foreach. Another option is: for f in $$empty_list ${SUBDIRS}; do ... where 'empty_list' is any undefined sh variable. Not bad, but will break if the shell is run with the `-u' option on for some reason. man 1 sh: -u nounset Write a message to standard error when attempting to expand a variable that is not set, and if the shell is not interactive, exit immediately. (UNIMPLEMENTED) ^ :) /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: empty lists in for (/bin/sh)
hi, there! On Mon, 6 Mar 2000, Martin Cracauer wrote: I just checked POSIX 1003.2. for name [ in word ] do compound-list done "First, the list of words following 'in' shall be expanded to generate a list of items." [...] "If no items result from the expansion, the compound-list shall not be executed." nothing is not a word at all, so it can't be expanded, so I think bash is corrent to complain about a syntax error. It is clear, though, that your (John) example "variable expansion to nothing" is not an error and both shells do it right. A lot of stuff in /usr/ports/Mk/bsd.port.mk depends on current /bin/sh behaviour ("do nothing" instead of "complain and bail out"). I am the original poster and faced this problem when tried to port FreeBSD Ports subsystem to Solaris and Linux. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
empty lists in for
hi, there! I'm trying to port FreeBSD ports subsystem to Solaris and Linux (for our company internal needs). many for's in bsd.port.mk are expanded into for's with empty word list (e.g.: for i in ; do smth; done). bash and ksh complain about unexpected ';'. /bin/sh (FreeBSD) thinks it's ok and does nothing. Which behaviour is more POSIXly correct? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: accounting, ppp
hi, there! On Mon, 14 Feb 2000, Egervary Gergely wrote: I'm running a PPP dialup server. (mgetty-autoppp) Is there any way to do login accounting (like solaris' PAM modules, or linux pam_limits.so) A FreeBSD PAM module? ;) We use the same PAM code as linux, so grab the source of the module you use under linux and compile it on FreeBSD. btw. I can't get time accounting to work. I've done accton /var/account/acct, I can query informations with `sa' but I can't do any restrictions in login.conf -- :accounted:\ :sessionlimit=1: and login still let me log in more than once. both login and pam_unix.so do not have accounting capabilities /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
does -frepo work in gcc-devel or -current gcc?
hi, there! This small program does not build with both -current gcc (gcc version 2.95.2 19991024 (release), I built collect2 for it manually) and gcc-devel (gcc version 2.96 2110 (experimental)) --- cut here --- CXX=g++ -frepo LD=g++ foo: foo.o $(LD) -o $* $ clean: rm -f foo.o foo foo.rpo --- cut here --- --- cut here --- #include string #include vector main(void) { std::vectorstd::string v; std::string s = "foo"; v.push_back(s); return 0; } --- cut here --- When I tried to compile the same program on Solaris (gcc 2.95.1) and Linux (gcc 2.95.2) everything went ok but I noticed that collect2 recompiles foo.cc twice. On FreeBSD foo.cc gets recompiled only once and on the second pass collect2 bails out in tlink.c:do_tlink after scan_linker_output() call. I need -frepo because I'm porting quite large project to FreeBSD and -frepo is used there heavily. However porting it to Linux was not that hard. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
-frepo broken
hi, there! seems that i tracked down the problem: ld uses cplus-dem.c from libiberty (contrib/binutils/libiberty/cplus-dem.c) which differs from that one gcc is compiled with (contrib/gcc/cplus-dem.c). When I compiled collect2 with libiberty's cplus-dem.c everything went ok. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
openssh 1.2
hi, there! just installed the openssh port: everything is fine but i miss one feature: OpenBSD guys removed calling ssh-askpass from ssh-add (because ssh-askpass require X libs for building) and removed ssh-askpass at all. maybe it would be better to put ssh-askpass in ports (ssh 1.2.16 which was the base for openssh has ssh-askpass) and put back ssh-askpass call to ssh-add. if openssh will be put in source tree we can have dummy version of ssh-askpass there (which does nothing) and normal ssh-askpass in ports. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: RTLD_GLOBAL/RTLD_LOCAL dlopen mode flags
hi, there! On Mon, 1 Nov 1999, John Polstra wrote: Are there any plans to implement RTLD_GLOBAL/RTLD_LOCAL mode flags for dlopen? RTLD_GLOBAL has been supported in -current since around the beginning of September. great. I think that manpage should be brought up to date with -current dlopen impl. (it says nothing about RTLD_GLOBAL) What is RTLD_LOCAL, and which OS supports it? I've never heard of that one. The default behavior is RTLD_LOCAL but nevertheless Solaris and Linux define it as #define RTLD_LOCAL 0x for Unix98 conformance /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RTLD_GLOBAL/RTLD_LOCAL dlopen mode flags
hi, there! Are there any plans to implement RTLD_GLOBAL/RTLD_LOCAL mode flags for dlopen? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: dropped connections (fwd)
hi, there ee does the same. The reason is that the program does not check for EOF on stdin, it continuously loops. It's a bug in the program. The thing that could have been changed is a signal from the shell that is no longer sent or so. The problem is the program, not the OS. It might be wortwhile to find the problem, solve and send the patch to the maintainer of the port and the original author. the problem is in out ncurses (in -stable) I've submitted a PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=13679) Please please please take a look at it as we (here at NSU) would like to see fixed ncurses in 3.3-RELEASE (I think ncurses 5 never would be MFC'ed to -stable?) Thanks /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: dropped connections (fwd)
hi, there ee does the same. The reason is that the program does not check for EOF on stdin, it continuously loops. It's a bug in the program. The thing that could have been changed is a signal from the shell that is no longer sent or so. The problem is the program, not the OS. It might be wortwhile to find the problem, solve and send the patch to the maintainer of the port and the original author. the problem is in out ncurses (in -stable) I've submitted a PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=13679) Please please please take a look at it as we (here at NSU) would like to see fixed ncurses in 3.3-RELEASE (I think ncurses 5 never would be MFC'ed to -stable?) Thanks /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: Are the ethernet drivers time dependent?
hi, there! On Mon, 30 Aug 1999, Matthew N. Dodd wrote: : I have some frequecy hopping radio modems that use the 82593 to get : 256kbps or so... Speaking of which, I'll give two free to someone that commits to writing a driver for these beasts. It would be an excellent chance for reverse engineering skills to be honed. :-) I would prefer someone local to boulder/denver Colorado, but I can't be too picky. Arcnet drivers? Already written by some chap from one of the former Soviet block countries. Actually he ported the NetBSD Amiga code. I've been meaning to take a look at it and do something with it but I've not had the time to investigate the NetBSD ARP code changes that it would require. it was me. arcnet driver is available at http://iclub.nsu.ru/~fjoe unfortunately i do not have time to deal with it now. hope i will have some in near future. btw i'd be happy if someone took a look at those ARP code changes. With those changes committed it would be easier to merge this driver (at least to -current) as our current implementation is ethernet-specific. just look at token ring hacks in if_ether.c -- i do not want to add more hacks for arcnet. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Are the ethernet drivers time dependent?
hi, there! On Mon, 30 Aug 1999, Matthew N. Dodd wrote: : I have some frequecy hopping radio modems that use the 82593 to get : 256kbps or so... Speaking of which, I'll give two free to someone that commits to writing a driver for these beasts. It would be an excellent chance for reverse engineering skills to be honed. :-) I would prefer someone local to boulder/denver Colorado, but I can't be too picky. Arcnet drivers? Already written by some chap from one of the former Soviet block countries. Actually he ported the NetBSD Amiga code. I've been meaning to take a look at it and do something with it but I've not had the time to investigate the NetBSD ARP code changes that it would require. it was me. arcnet driver is available at http://iclub.nsu.ru/~fjoe unfortunately i do not have time to deal with it now. hope i will have some in near future. btw i'd be happy if someone took a look at those ARP code changes. With those changes committed it would be easier to merge this driver (at least to -current) as our current implementation is ethernet-specific. just look at token ring hacks in if_ether.c -- i do not want to add more hacks for arcnet. /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
dropped connections (fwd)
hi, there! sorry for asking here, but got no replies on -questions direct replies are not nessessary if you'll answer to -hackers -- Forwarded message -- Date: Mon, 23 Aug 1999 17:54:32 +0700 (NSS) From: Max Khon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: dropped connections hi, there! after upgrade to 3.2-STABLE from 2.2.8-STABLE we are experiencing problems with closed telnet sessions. If a user drops connection (closes telnet on his workstation without logging off) pdmenu, midnight commander and other programs eat up all the CPU (99% CPU usage as reported by top) Is there anything that changed between 2.x and 3.x and can cause this affect? Is there any workaround? Please reply directly as I am not subscribed /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
dropped connections (fwd)
hi, there! sorry for asking here, but got no replies on -questions direct replies are not nessessary if you'll answer to -hackers -- Forwarded message -- Date: Mon, 23 Aug 1999 17:54:32 +0700 (NSS) From: Max Khon f...@iclub.nsu.ru To: questi...@freebsd.org Subject: dropped connections hi, there! after upgrade to 3.2-STABLE from 2.2.8-STABLE we are experiencing problems with closed telnet sessions. If a user drops connection (closes telnet on his workstation without logging off) pdmenu, midnight commander and other programs eat up all the CPU (99% CPU usage as reported by top) Is there anything that changed between 2.x and 3.x and can cause this affect? Is there any workaround? Please reply directly as I am not subscribed /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
AccelePort C/X
hi, there! are there any device drivers for any *BSD for DigiBoard AccelePort C/X or should I start writing them myself? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
AccelePort C/X
hi, there! are there any device drivers for any *BSD for DigiBoard AccelePort C/X or should I start writing them myself? /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: NSS Project
hi, there! On Tue, 3 Aug 1999, Oscar Bonilla wrote: *Step One: I ported the NetBSD implementation of nsdispatch(3) as implemented by Luke Mewburn. See attached patch to libc and new header file. I'm also attaching the man page for /etc/nsswitch.conf. Right now it compiles, installs, and works for some simple tests I've run. *Step Two: make getpwent, getgrent, and friends actually use the nsdispatch function. I've already started looking at the source, but am having trouble with the NIS part. Maybe someone more knowledgeable could write the NIS function. Basically we have to reduce each of the functions to a simple nsdispatch call and then implement the real functions... Here's an example from getpwent.c /* Basically we reduce getpwent to a simple nsdispatch call */ struct passwd * getpwent() { int r; static const ns_dtab dtab[] = { NS_FILES_CB(_local_getpw, NULL) NS_DNS_CB(_dns_getpw, NULL) NS_NIS_CB(_nis_getpw, NULL) NS_COMPAT_CB(_compat_getpwent, NULL) { 0 } }; r = nsdispatch(NULL, dtab, NSDB_PASSWD, getpwent, compatsrc, _PW_KEYBYNUM); if (r != NS_SUCCESS) return (struct passwd *)NULL; return _pw_passwd; } The we have to implement _local_getpw, _dns_getpw, _nis_getpw, and _compat_getpwent and make them behave as expected. NetBSD seems to support having the passwd database on DNS using something called HESIOD (I hadn't heard about it before). I don't think FreeBSD *Step Three: Implement _ldap_getpw :) pam/nss ldap modules are already available (http://www.padl.com) i think we should implement NSS in that way so we need not recompile if we want to add third-party nss module. Also compatibility with Solaris is desirable. /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: NSS Project
hi, there! On Tue, 3 Aug 1999, Oscar Bonilla wrote: *Step One: I ported the NetBSD implementation of nsdispatch(3) as implemented by Luke Mewburn. See attached patch to libc and new header file. I'm also attaching the man page for /etc/nsswitch.conf. Right now it compiles, installs, and works for some simple tests I've run. *Step Two: make getpwent, getgrent, and friends actually use the nsdispatch function. I've already started looking at the source, but am having trouble with the NIS part. Maybe someone more knowledgeable could write the NIS function. Basically we have to reduce each of the functions to a simple nsdispatch call and then implement the real functions... Here's an example from getpwent.c /* Basically we reduce getpwent to a simple nsdispatch call */ struct passwd * getpwent() { int r; static const ns_dtab dtab[] = { NS_FILES_CB(_local_getpw, NULL) NS_DNS_CB(_dns_getpw, NULL) NS_NIS_CB(_nis_getpw, NULL) NS_COMPAT_CB(_compat_getpwent, NULL) { 0 } }; r = nsdispatch(NULL, dtab, NSDB_PASSWD, "getpwent", compatsrc, _PW_KEYBYNUM); if (r != NS_SUCCESS) return (struct passwd *)NULL; return _pw_passwd; } The we have to implement _local_getpw, _dns_getpw, _nis_getpw, and _compat_getpwent and make them behave as expected. NetBSD seems to support having the passwd database on DNS using something called HESIOD (I hadn't heard about it before). I don't think FreeBSD *Step Three: Implement _ldap_getpw :) pam/nss ldap modules are already available (http://www.padl.com) i think we should implement NSS in that way so we need not recompile if we want to add third-party nss module. Also compatibility with Solaris is desirable. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FTPd authentication with PAM/MySQL
hi, there! On Mon, 26 Jul 1999, Steven Fletcher wrote: I've seen the PAM modules/libraries/etc for MySQL and noticed that the FTPD Makefile has a Kerberos PAM option, and was wondering if anyone knows of a way to get FTPd talking to MySQL... or if it would work at all? ftpd PAM patches (and other PAM stuff) are available at http://iclub.nsu.ru/~fjoe /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FTPd authentication with PAM/MySQL
hi, there! On Mon, 26 Jul 1999, Steven Fletcher wrote: I've seen the PAM modules/libraries/etc for MySQL and noticed that the FTPD Makefile has a Kerberos PAM option, and was wondering if anyone knows of a way to get FTPd talking to MySQL... or if it would work at all? ftpd PAM patches (and other PAM stuff) are available at http://iclub.nsu.ru/~fjoe /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Fri, 16 Jul 1999, Oscar Bonilla wrote: Following up on my own post: For LDAP to be seamlessly integrated into the system some of the libraries have to be changed. Specifically the ones dealing with /etc/passwd and user information. I've decided the best way to do this is to do what's done with NIS. Basically handle the case where the user is not available in the local databases. the idea is to have an entry in the /etc/passwd enabling LDAP lookups. the Entry would be of the form ldap:*:389:389:o=My Organization, c=BR:uid:ldap.myorg.com ^^^ ^^^ ^^^ ^^ | ||| portbase dnattr LDAP Server This comes ftom a pam_ldap module I got from Pedro A M Vazquez [EMAIL PROTECTED] I'll change all of the function in lib/libc/gen/getpwent.c to handle this special case. The only problem is that openldap has to be integrated on the base system for this to compile... can I safely copy it to /usr/src/contrib? How do I submit this after it's done? anyone cares about ldap :)? aargh. looks horrible to me. better try to implement NSS /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: PAM LDAP in FreeBSD, and userfs too.
hi, there! On Mon, 19 Jul 1999, Dominic Mitchell wrote: On Mon, Jul 19, 1999 at 12:29:48PM -0400, David E. Cross wrote: I thought now would be a good time to chime in on some of my wild schemes... The reason I am interested in 'userfs' is to enable me to write a version of 'nsd'. [...] Lovely. Sounds like a much better way to do the Solaris/Linux (and NetBSD?) /etc/nsswitch.conf stuff. On Solaris at least, this is implemented using masses of weird shared objects... PAM is also "using masses of weird shared objects" but nevertheless it's quite usable /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
NSS project
hi, there! So what is the "official" status of NSS impl.? Are there any takers? /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Tue, 20 Jul 1999, Oscar Bonilla wrote: It looks like we've got some good concurrent projects happening at the moment - markm and co working on PAM, the nsswitch.conf project you're talking about, and the stuff I'm working on with modularizing crypt() and supporting per-login class password hashes (I've rewritten the library since I last posted about it and expect to have my code cleaned up by tomorrow night for another snapshot). The thing to make sure is that we don't tread on each other's toes, and basically that we look for the big picture and how all these projects fit together. Ok, this is my understanding of the thing: There are two parts to the problem, first we need a way to tell the system where to get its information from (call them databases, tables or whatever). This should be done a la solaris, with /etc/nsswitch.conf telling if this is to be fetched from "files, ldap, nis, dns, etc". We need to recode all the programs that obtain this info directly from files to get it from a library (this would be nsd). And then code the library itself to get the info from /etc/nsswitch.conf You misunderstand the main goal of NSS -- you need not recode anything -- NSS substitutes getxxxbyzzz libc functions Second, we need a way to authenticate the user... this is what PAM does. What would need to be done is change the pam modules to make them nsd aware (i.e. where should I get the passwd from?) or make them /etc/auth.conf aware? this is the confusing part... where does crypt fit into this? crypt would get what from /etc/login.conf? go to http://www.padl.com and read about LDAP + NSS and PAM deployment schemes /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Mon, 19 Jul 1999, Oscar Bonilla wrote: On Mon, Jul 19, 1999 at 04:51:12PM -0600, Wes Peters wrote: The implementation details are as unimportant as ever: they have to work and be maintainable. Following prior art remains a good idea; the Solaris "name service switch" implementation is a good starting point to consider. I agree. In solaris (and linux by the way) all you do is set passwdldap files in /etc/nsswitch.conf and that's it. I had started to write the code to mess with libc to "fix" the getpwent stuff, but a better solution is to "port" the nsswitch stuff from linux (i don't have source from solaris :) glibc NSS impl. is GPL-poisoned and the author of that impl. (sorry, do not even remember his name) does not want to distribute it under BSD-style copyright. better try to port NetBSD impl. /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Fri, 16 Jul 1999, Oscar Bonilla wrote: Following up on my own post: For LDAP to be seamlessly integrated into the system some of the libraries have to be changed. Specifically the ones dealing with /etc/passwd and user information. I've decided the best way to do this is to do what's done with NIS. Basically handle the case where the user is not available in the local databases. the idea is to have an entry in the /etc/passwd enabling LDAP lookups. the Entry would be of the form ldap:*:389:389:o=My Organization, c=BR:uid:ldap.myorg.com ^^^ ^^^ ^^^ ^^ | ||| portbase dnattr LDAP Server This comes ftom a pam_ldap module I got from Pedro A M Vazquez vazq...@iqm.unicamp.br I'll change all of the function in lib/libc/gen/getpwent.c to handle this special case. The only problem is that openldap has to be integrated on the base system for this to compile... can I safely copy it to /usr/src/contrib? How do I submit this after it's done? anyone cares about ldap :)? aargh. looks horrible to me. better try to implement NSS /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: PAM LDAP in FreeBSD, and userfs too.
hi, there! On Mon, 19 Jul 1999, Dominic Mitchell wrote: On Mon, Jul 19, 1999 at 12:29:48PM -0400, David E. Cross wrote: I thought now would be a good time to chime in on some of my wild schemes... The reason I am interested in 'userfs' is to enable me to write a version of 'nsd'. [...] Lovely. Sounds like a much better way to do the Solaris/Linux (and NetBSD?) /etc/nsswitch.conf stuff. On Solaris at least, this is implemented using masses of weird shared objects... PAM is also using masses of weird shared objects but nevertheless it's quite usable /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
NSS project
hi, there! So what is the official status of NSS impl.? Are there any takers? /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Thu, 22 Jul 1999, Daniel C. Sobral wrote: I perceive here an unfair biasing toward nss. Someone mentioned defining where to get the passwords from based on the login class. This is a very interesting option, that doesn't seem to be well served by nss. there is already nss_ldap module for NSS to get all the stuff from LDAP that's why NSS is better (for me) than other solutions /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Tue, 20 Jul 1999, Oscar Bonilla wrote: It looks like we've got some good concurrent projects happening at the moment - markm and co working on PAM, the nsswitch.conf project you're talking about, and the stuff I'm working on with modularizing crypt() and supporting per-login class password hashes (I've rewritten the library since I last posted about it and expect to have my code cleaned up by tomorrow night for another snapshot). The thing to make sure is that we don't tread on each other's toes, and basically that we look for the big picture and how all these projects fit together. Ok, this is my understanding of the thing: There are two parts to the problem, first we need a way to tell the system where to get its information from (call them databases, tables or whatever). This should be done a la solaris, with /etc/nsswitch.conf telling if this is to be fetched from files, ldap, nis, dns, etc. We need to recode all the programs that obtain this info directly from files to get it from a library (this would be nsd). And then code the library itself to get the info from /etc/nsswitch.conf You misunderstand the main goal of NSS -- you need not recode anything -- NSS substitutes getxxxbyzzz libc functions Second, we need a way to authenticate the user... this is what PAM does. What would need to be done is change the pam modules to make them nsd aware (i.e. where should I get the passwd from?) or make them /etc/auth.conf aware? this is the confusing part... where does crypt fit into this? crypt would get what from /etc/login.conf? go to http://www.padl.com and read about LDAP + NSS and PAM deployment schemes /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: PAM LDAP in FreeBSD
hi, there! On Mon, 19 Jul 1999, Oscar Bonilla wrote: On Mon, Jul 19, 1999 at 04:51:12PM -0600, Wes Peters wrote: The implementation details are as unimportant as ever: they have to work and be maintainable. Following prior art remains a good idea; the Solaris name service switch implementation is a good starting point to consider. I agree. In solaris (and linux by the way) all you do is set passwdldap files in /etc/nsswitch.conf and that's it. I had started to write the code to mess with libc to fix the getpwent stuff, but a better solution is to port the nsswitch stuff from linux (i don't have source from solaris :) glibc NSS impl. is GPL-poisoned and the author of that impl. (sorry, do not even remember his name) does not want to distribute it under BSD-style copyright. better try to port NetBSD impl. /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: rtfm rewritten in C (updated)
hi, there! On Sun, 11 Jul 1999, Chris Costello wrote: I've implemented a few new features. First off, strdup() isn't abused anymore so the program should run much smoother and smaller, as well as more quickly. Secondly, I have (thanks in part to Alfred Perlstein) added both case-insensitive searches (-i) and local FAQ search (can be overridden with -o, online, flag). Too many others to enumerate. As usual, it's at http://www.calldei.com/~chris/rtfm.tar.gz what about to use shell patterns (fnmatch) instead of substring search? :) /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: Dynamic linking
hi, there! On Mon, 5 Jul 1999, Andrew Iltchenko wrote: Is there a way of making dlopen return an error from the shared object's _init function? Thanks. You can do this by yourself by defining something like int _module_init() and calling it after dlopen'inig the object /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: dlopen returns non NULL
hi, there! On Wed, 30 Jun 1999, John Polstra wrote: in the following code `dlopen' returns NULL on the first iteration (because g() is not defined) -- it's ok but on the second iteration `dlopen' returns valid dlh ELF or a.out? Which version of FreeBSD? For a.out, it's a known bug and there is already an open PR on it. I wouldn't be surprised if the bug existed in ELF too. 3.2-STABLE built on 10 Jun, ELF /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
dlopen returns non NULL
hi, there! in the following code `dlopen' returns NULL on the first iteration (because g() is not defined) -- it's ok but on the second iteration `dlopen' returns "valid" dlh I need the code like this to load some functions dynamically. The code below shows that it's unable to ensure that all the symbols in .so to be loaded can be properly resolved AND try again (with recompiled module) if dlopen fails first time. Any suggestions? --- cut here (Makefile) --- CFLAGS = -g all: dl.so main4 dl.so: dl.c gcc -o dl.so $(CFLAGS) -shared -fpic -fPIC dl.c main4: main4.o gcc -o main4 -export-dynamic main4.o clean: rm -f dl.so main4.o --- cut here --- --- cut here (dl.c) --- #include stdio.h void f() { printf("Hello, world!\n"); g(); } --- cut here --- --- cut here (main4.c) --- #include dlfcn.h #include stdlib.h #include stdio.h main() { void *dlh = NULL; void (*f)(void); for (;;) { getchar(); if (dlh != NULL) { dlclose(dlh); dlh = NULL; } dlh = dlopen("./dl.so", RTLD_NOW); if (dlh == NULL) { fprintf(stderr, "dlopen: %s\n", dlerror()); continue; } f = dlsym(dlh, "f"); if (f == NULL) { fprintf(stderr, "dlsym: %s\n", dlerror()); dlh = NULL; continue; } f(); } dlclose(dlh); return 0; } --- cut here --- /fjoe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
dlopen returns non NULL
hi, there! in the following code `dlopen' returns NULL on the first iteration (because g() is not defined) -- it's ok but on the second iteration `dlopen' returns valid dlh I need the code like this to load some functions dynamically. The code below shows that it's unable to ensure that all the symbols in .so to be loaded can be properly resolved AND try again (with recompiled module) if dlopen fails first time. Any suggestions? --- cut here (Makefile) --- CFLAGS = -g all: dl.so main4 dl.so: dl.c gcc -o dl.so $(CFLAGS) -shared -fpic -fPIC dl.c main4: main4.o gcc -o main4 -export-dynamic main4.o clean: rm -f dl.so main4.o --- cut here --- --- cut here (dl.c) --- #include stdio.h void f() { printf(Hello, world!\n); g(); } --- cut here --- --- cut here (main4.c) --- #include dlfcn.h #include stdlib.h #include stdio.h main() { void *dlh = NULL; void (*f)(void); for (;;) { getchar(); if (dlh != NULL) { dlclose(dlh); dlh = NULL; } dlh = dlopen(./dl.so, RTLD_NOW); if (dlh == NULL) { fprintf(stderr, dlopen: %s\n, dlerror()); continue; } f = dlsym(dlh, f); if (f == NULL) { fprintf(stderr, dlsym: %s\n, dlerror()); dlh = NULL; continue; } f(); } dlclose(dlh); return 0; } --- cut here --- /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
.so versions
hi, there! sorry if this question is not for -hackers I have some program that loads some .so via dlopen (ELF) and the looks up some symbols in that .so (functions) and calls that functions (with some known ABI). There are two problems with this: - how to check ABI version for program and .so (to be sure that ABI version used by program and implemented in .so are the same) - how to reload foo.so safely. i.e. if there were any errors while reloading foo.so the program should be able to run with previously loaded version of foo.so (symbols obtained from previous load of foo.so should not be lost). /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: a two-level port system? (fwd)
hi, there! On Mon, 31 May 1999, Satoshi - Ports Wraith - Asami wrote: @ Version control. Can you check out an arbitrary version of any file? I want to do something like give me the changes in Makefile between yesterday and today. It's hard to check out the port for an arbitrary version of program. E.g.: try to check out port for samba 1.9.18p10 /fjoe PS sorry, previous post was a bogus To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: a two-level port system? (fwd)
hi, there! On Mon, 31 May 1999, Satoshi - Ports Wraith - Asami wrote: To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: a two-level port system? (fwd)
hi, there! On Mon, 31 May 1999, Bill Fumerola wrote: It's hard to check out the port for an arbitrary version of program. Not really. E.g.: try to check out port for samba 1.9.18p10 $ cvs co -D 08/29/98 samba works for me on freefall. I have very (VERY!) bad link to anoncvs.freebsd.org. are there other anoncvs servers? /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
NSS
hi, there! Are there any projects to implement NSS under FreeBSD (or other *BSDs)? /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: NSS
hi, there! On Thu, 27 May 1999, Chuck Robey wrote: Are there any projects to implement NSS under FreeBSD (or other *BSDs)? Might be courteous of you, if you could at least include *some* kind of definition of what NSS is (like maybe a web pointer?) ah, I'm sorry. NSS stands for Name Service Switch NSS is implemented in Solaris 2.5 and glibc2. Some NSS info is available at http://www.rage.net/ldap/nss.shtml If FreeBSD had NSS it would be possible to use LDAP server (OpenLDAP) + nss_ldap instead of NIS. LDAP + pam_ldap partially solve this problem but LDAP + nss_ldap is much better solution. /fjoe To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message