niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » FreeBSD » mail-lists » Architecture
make tools question & symbol versioning
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
Daniel Eischen
*nix forums addict


Joined: 20 Sep 2002
Posts: 68

PostPosted: Mon Mar 06, 2006 11:45 am    Post subject: Re: make tools question & symbol versioning Reply with quote

On Sun, 5 Mar 2006, Peter Wemm wrote:

Quote:
On Tuesday 28 February 2006 07:06 am, Daniel Eischen wrote:
On Tue, 28 Feb 2006, Hajimu UMEMOTO wrote:

deischen> I'll remove gethostbyname_r. If you find others that
deischen> shouldn't be there, please let me know.

Please remove the functions listed in netdb_private.h.

Will do.

These are real exported functions. The netdb_private.h thing is a hack
to force people to do the correct #includes. People got tired of folks
using ancient code with bogus manual 'extern' declarations with bogus
structs and wondering why it didn't work correctly.

I think they should be versioned, and the netdb_private.h stuff adjusted
if necessary.

It looks like these functions:

__endhostent_r
__endnetent_r
__endprotoent_r
__endservent_r
__gethostbyaddr_r
__gethostbyname_r
__gethostbyname2_r
__gethostent_r
__getnetbyaddr_r
__getnetbyname_r
__getnetent_r
__getprotobyname_r
__getprotobynumber_r
__getprotoent_r
__getservbyname_r
__getservbyport_r
__getservent_r
__sethostent_r
__setnetent_r
__setprotoent_r
__setservent_r

were added relatively recently (April 05) to make the library
thread-safe. They are not in the POSIX spec, nor are they
in any of our standard headers. Of the above, only the following
are visible/global in Solaris 8 (libsocket):

getnetbyaddr_r
getnetbyname_r
getnetent_r
getprotobyname_r
getprotobynumber_r
getprotoent_r
getservbyname_r
getservbyport_r
getservent_r

and there are no setfoo_r() functions.

I don't think our functions are meant to be (at least yet)
visible to applications and have only been in the tree for
a year, as well as being prefixed with "__".

--
DE

_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Peter Wemm
*nix forums Guru Wannabe


Joined: 11 Apr 2002
Posts: 113

PostPosted: Mon Mar 06, 2006 3:37 am    Post subject: Re: make tools question & symbol versioning Reply with quote

On Tuesday 28 February 2006 07:06 am, Daniel Eischen wrote:
Quote:
On Tue, 28 Feb 2006, Hajimu UMEMOTO wrote:
Hi,

On Tue, 28 Feb 2006 09:43:28 -0500 (EST)
Daniel Eischen <deischen@freebsd.org> said:

deischen> For that particular function, I thought it was suppose to
be exported deischen> for use by applications. It doesn't begin
with underscores, and it deischen> ends with "_r", so it certainly
looked like it should.

deischen> These functions should be renamed if they are internal
interfaces.

No, they are already have __ prefix. Please refer
libc/net/netdb_private.h.

Ok, I see that now. Personally, I don't like renaming things like
that. It's just one more level of obfuscation.

deischen> I'll remove gethostbyname_r. If you find others that
shouldn't be deischen> there, please let me know.

Please remove the functions listed in netdb_private.h.

Will do.

These are real exported functions. The netdb_private.h thing is a hack
to force people to do the correct #includes. People got tired of folks
using ancient code with bogus manual 'extern' declarations with bogus
structs and wondering why it didn't work correctly.

I think they should be versioned, and the netdb_private.h stuff adjusted
if necessary.
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Daniel Eischen
*nix forums addict


Joined: 20 Sep 2002
Posts: 68

PostPosted: Tue Feb 28, 2006 3:06 pm    Post subject: Re: make tools question & symbol versioning Reply with quote

On Tue, 28 Feb 2006, Hajimu UMEMOTO wrote:

Quote:
Hi,

On Tue, 28 Feb 2006 09:43:28 -0500 (EST)
Daniel Eischen <deischen@freebsd.org> said:

deischen> For that particular function, I thought it was suppose to be exported
deischen> for use by applications. It doesn't begin with underscores, and it
deischen> ends with "_r", so it certainly looked like it should.

deischen> These functions should be renamed if they are internal interfaces.

No, they are already have __ prefix. Please refer libc/net/netdb_private.h.

Ok, I see that now. Personally, I don't like renaming things like
that. It's just one more level of obfuscation.

Quote:
deischen> I'll remove gethostbyname_r. If you find others that shouldn't be
deischen> there, please let me know.

Please remove the functions listed in netdb_private.h.

Will do.

--
DE

_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Hajimu UMEMOTO
*nix forums beginner


Joined: 16 Jun 2002
Posts: 46

PostPosted: Tue Feb 28, 2006 2:58 pm    Post subject: Re: make tools question & symbol versioning Reply with quote

Hi,

Quote:
On Tue, 28 Feb 2006 09:43:28 -0500 (EST)
Daniel Eischen <deischen@freebsd.org> said:

deischen> For that particular function, I thought it was suppose to be exported
deischen> for use by applications. It doesn't begin with underscores, and it
deischen> ends with "_r", so it certainly looked like it should.

deischen> These functions should be renamed if they are internal interfaces.

No, they are already have __ prefix. Please refer libc/net/netdb_private.h.

deischen> I'll remove gethostbyname_r. If you find others that shouldn't be
deischen> there, please let me know.

Please remove the functions listed in netdb_private.h.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Daniel Eischen
*nix forums addict


Joined: 20 Sep 2002
Posts: 68

PostPosted: Tue Feb 28, 2006 2:43 pm    Post subject: Re: make tools question & symbol versioning Reply with quote

On Tue, 28 Feb 2006, Hajimu UMEMOTO wrote:

Quote:
Hi,

On Tue, 28 Feb 2006 00:51:48 -0500 (EST)
Daniel Eischen <eischen@vigrid.com> said:

eischen> I'm working on symbol versioning for libc and have an awk script
eischen> that needs to run (from libc/Makefile) in order to generate the
eischen> symbol map file. It may also be applicable for symbol versioning
eischen> other libraries. Where is the right place to put it?

eischen> If anyone is interested in reviewing, the first shot at symbol
eischen> versioning for libc at:

eischen> http://people.freebsd.org/~deischen/symver/symver.diffs

eischen> I was conservative in removing global symbols. I'm sure there
eischen> are others that can be removed, but we can do that later.

It seems your diff includes the functions only for libc internal, such
as gethostbyname_r. Do we need to target such symbols?

For that particular function, I thought it was suppose to be exported
for use by applications. It doesn't begin with underscores, and it
ends with "_r", so it certainly looked like it should.

These functions should be renamed if they are internal interfaces.

I'll remove gethostbyname_r. If you find others that shouldn't be
there, please let me know.

--
DE

_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Hajimu UMEMOTO
*nix forums beginner


Joined: 16 Jun 2002
Posts: 46

PostPosted: Tue Feb 28, 2006 6:23 am    Post subject: Re: make tools question & symbol versioning Reply with quote

Hi,

Quote:
On Tue, 28 Feb 2006 00:51:48 -0500 (EST)
Daniel Eischen <eischen@vigrid.com> said:

eischen> I'm working on symbol versioning for libc and have an awk script
eischen> that needs to run (from libc/Makefile) in order to generate the
eischen> symbol map file. It may also be applicable for symbol versioning
eischen> other libraries. Where is the right place to put it?

eischen> If anyone is interested in reviewing, the first shot at symbol
eischen> versioning for libc at:

eischen> http://people.freebsd.org/~deischen/symver/symver.diffs

eischen> I was conservative in removing global symbols. I'm sure there
eischen> are others that can be removed, but we can do that later.

It seems your diff includes the functions only for libc internal, such
as gethostbyname_r. Do we need to target such symbols?

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Daniel Eischen
*nix forums addict


Joined: 20 Sep 2002
Posts: 68

PostPosted: Tue Feb 28, 2006 5:51 am    Post subject: make tools question & symbol versioning Reply with quote

I'm working on symbol versioning for libc and have an awk script
that needs to run (from libc/Makefile) in order to generate the
symbol map file. It may also be applicable for symbol versioning
other libraries. Where is the right place to put it?

If anyone is interested in reviewing, the first shot at symbol
versioning for libc at:

http://people.freebsd.org/~deischen/symver/symver.diffs

I was conservative in removing global symbols. I'm sure there
are others that can be removed, but we can do that later.

For those that don't know what symbol versioning is, there's
a brief explanation at:

http://people.freebsd.org/~deischen/symver/library_versioning.txt

and you can find some other documents at:

http://people.redhat.com/~drepper/symbol-versioning
http://docs.sun.com/app/docs/doc/817-4415/6mjum5she?a=view

or google.

--
DE


_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 11:56 am | All times are GMT
navigation Forum index » *nix » BSD » FreeBSD » mail-lists » Architecture
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Newbie question: How to forward a domain to a mailbox? leei Postfix 0 Fri Aug 24, 2007 4:55 pm
No new posts configuration question for httpd Karl Wang Apache 1 Fri Jul 21, 2006 2:10 pm
No new posts nim problem/question Ron AIX 0 Fri Jul 21, 2006 1:57 pm
No new posts make printer network available Johann Höchtl networking 0 Fri Jul 21, 2006 9:01 am
No new posts question for JAVA developer who r using postgres sql as b... deepak pal PostgreSQL 1 Fri Jul 21, 2006 9:00 am

Latest Credit Cards | Debt Consolidation | Debt Consolidation | Beijing Olympic | Debt Consolidation
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3065s ][ Queries: 20 (0.2037s) ][ GZIP on - Debug on ]