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
Why isn't __progname declared in a header?
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
Mark Murray
*nix forums beginner


Joined: 24 Mar 2002
Posts: 49

PostPosted: Sun Mar 24, 2002 6:11 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

Quote:
2) To coerce stronger type-checking in its implementation and external
usage.

Are you waning other consumers to include this file also?
If so, we should put it in a more central location.

No - there are only two places it should be used - inside csu/*/crt[01].c
and in lib/libc/gen/[gs]etprogname.c. The rest are bogus and need to be
replaced with [gs]etprogname(3).

M
--
o Mark Murray
\_
O.\_ Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
David O'Brien
*nix forums beginner


Joined: 24 Mar 2002
Posts: 1

PostPosted: Sun Mar 24, 2002 5:29 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

On Sun, Mar 24, 2002 at 05:09:10PM +0000, Mark Murray wrote:
Quote:
Hmm. It is implemented in csu/*/crt[01].c, so how about
csu/common/_progname.h?

Why create a header for just one line that is easy to duplicate in the
only 4 places it is used?

2) To coerce stronger type-checking in its implementation and external
usage.

Are you waning other consumers to include this file also?
If so, we should put it in a more central location.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Bruce Evans
*nix forums Guru Wannabe


Joined: 22 Mar 2002
Posts: 190

PostPosted: Sun Mar 24, 2002 5:01 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

On Sun, 24 Mar 2002, Mark Murray wrote:

Quote:
On Sun, 24 Mar 2002, Mark Murray wrote:

__progname is (inconsistently) declared all over the place. Why is
this not in a header?

Because all over the place is unwarrantedly chummy with the implementation.
__progname should only be used in csu/*/crt1.c, getprogname(3),
setprogname(3) and perhaps in other parts of the implementation.

OK, I've fixed that in src/lib/lib*

Next question, what header should it go into? I'm quite happy to do
the work.

libc/include/libc_private.h is almost right.

Hmm. It is implemented in csu/*/crt[01].c, so how about
csu/common/_progname.h?

Further from being almost right. It would be a new header with very little
in it, and isn't in libc's tree any more than libc's header is in csu's
tree.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Mark Murray
*nix forums beginner


Joined: 24 Mar 2002
Posts: 49

PostPosted: Sun Mar 24, 2002 4:09 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

Quote:
Hmm. It is implemented in csu/*/crt[01].c, so how about
csu/common/_progname.h?

Why create a header for just one line that is easy to duplicate in the
only 4 places it is used?

1) To prevent it from diverging in the (currently only) 4 architectures
that we have.

2) To coerce stronger type-checking in its implementation and external
usage.

M
--
o Mark Murray
\_
O.\_ Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
David O'Brien
*nix forums beginner


Joined: 24 Mar 2002
Posts: 1

PostPosted: Sun Mar 24, 2002 3:49 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

On Sun, Mar 24, 2002 at 02:37:55PM +0000, Mark Murray wrote:
Quote:
Next question, what header should it go into? I'm quite happy to do
the work.

libc/include/libc_private.h is almost right.

Hmm. It is implemented in csu/*/crt[01].c, so how about
csu/common/_progname.h?

Why create a header for just one line that is easy to duplicate in the
only 4 places it is used?

--
-- David (obrien@FreeBSD.org)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Mark Murray
*nix forums beginner


Joined: 24 Mar 2002
Posts: 49

PostPosted: Sun Mar 24, 2002 1:37 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

Quote:
On Sun, 24 Mar 2002, Mark Murray wrote:

__progname is (inconsistently) declared all over the place. Why is
this not in a header?

Because all over the place is unwarrantedly chummy with the implementation.
__progname should only be used in csu/*/crt1.c, getprogname(3),
setprogname(3) and perhaps in other parts of the implementation.

OK, I've fixed that in src/lib/lib*

Quote:
Next question, what header should it go into? I'm quite happy to do
the work.

libc/include/libc_private.h is almost right.

Hmm. It is implemented in csu/*/crt[01].c, so how about
csu/common/_progname.h?

M
--
o Mark Murray
\_
O.\_ Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Bruce Evans
*nix forums Guru Wannabe


Joined: 22 Mar 2002
Posts: 190

PostPosted: Sun Mar 24, 2002 1:24 pm    Post subject: Re: Why isn't __progname declared in a header? Reply with quote

On Sun, 24 Mar 2002, Mark Murray wrote:

Quote:
__progname is (inconsistently) declared all over the place. Why is
this not in a header?

Because all over the place is unwarrantedly chummy with the implementation.
__progname should only be used in csu/*/crt1.c, getprogname(3),
setprogname(3) and perhaps in other parts of the implementation.

Quote:
Next question, what header should it go into? I'm quite happy to do
the work.

libc/include/libc_private.h is almost right.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Mark Murray
*nix forums beginner


Joined: 24 Mar 2002
Posts: 49

PostPosted: Sun Mar 24, 2002 10:41 am    Post subject: Why isn't __progname declared in a header? Reply with quote

Hi

__progname is (inconsistently) declared all over the place. Why is
this not in a header?

Next question, what header should it go into? I'm quite happy to do
the work.

M

--
o Mark Murray
\_
O.\_ Warning: this .sig is umop ap!sdn
#application/octet-stream; name=cv.pdf [Mark Murray CV PDF] cv.pdf
#text/plain; name=cv.txt [Mark Murray CV Plain Text] cv.txt

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 5:13 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 Unknown in header problem -SOLVED- Light Speed Postfix 0 Thu Jul 03, 2008 10:40 am
No new posts Insert header and footer in every page served by proxy ehmedk Apache 0 Tue Apr 22, 2008 6:27 pm
No new posts Insert header and footer in every page served by squid ehmedk Squid 0 Tue Apr 22, 2008 6:16 pm
No new posts Trouble Declaring 3D Array in Header File free2klim C++ 1 Fri Jul 21, 2006 4:07 am
No new posts location of header file after install gsl Fred J. Debian 3 Fri Jul 21, 2006 1:30 am

Sailor Moon Music | Mortgage | Magic the Gathering | Credit Card Consolidation | Novela romantica
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.1441s ][ Queries: 20 (0.0496s) ][ GZIP on - Debug on ]