Date: Fri, 8 Jan 1999 17:18:19 -0500 (EST) From: Sleepycat Software <db@abyssinian.sleepycat.com> To: jb@cimlogic.com.au Cc: freebsd-hackers@FreeBSD.ORG, openldap-devel@openldap.org, yusufg@huge.net Subject: Re: Strange warnings when compiling Berkeley DB on FreeBSD 3.0 Message-ID: <199901082218.RAA29040@abyssinian.sleepycat.com>
next in thread | raw e-mail | index | archive | help
> Sleepycat Software wrote: >>> cc -c -O -I. -I../dist/../include -D_THREAD_SAFE ../dist/../clib/getlong.c >>> cc -o db_dump185 db_dump185.o err.o getlong.o -lc_r >>> /usr/lib/libc.so: warning: this program uses gets(), which is unsafe. >> >> This is not a Berkeley DB error. Berkeley DB does not use gets(). > > Not commenting on the gets() warning, but the link line above links > db_dump185 against libc_r _and_ libc which is most certainly not what is > intended. If the application is threaded, pass `-pthread' to gcc and > it will link against libc_r /instead/ of libc. We were told that, for thread-safe programs under FreeBSD, we should add -D_THREAD_SAFE to the C pre-processor flags, and load against -lc_r. Is that not correct? Is there a preferred method of guaranteeing thread safety within the Berkeley DB library? Regards, Amy Adams =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Amy Adams Berkeley DB Product Manager Sleepycat Software Inc. db@sleepycat.com 394 E. Riding Dr. +1-617-633-2429 Carlisle, MA 01741 http://www.sleepycat.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901082218.RAA29040>