| Author |
Message |
Mark Murray *nix forums beginner
Joined: 24 Mar 2002
Posts: 49
|
Posted: Sun Mar 24, 2002 6:11 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
| 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
|
Posted: Sun Mar 24, 2002 5:29 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
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
|
Posted: Sun Mar 24, 2002 5:01 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
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
|
Posted: Sun Mar 24, 2002 4:09 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
| 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
|
Posted: Sun Mar 24, 2002 3:49 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
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
|
Posted: Sun Mar 24, 2002 1:37 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
| 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
|
Posted: Sun Mar 24, 2002 1:24 pm Post subject:
Re: Why isn't __progname declared in a header?
|
|
|
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
|
Posted: Sun Mar 24, 2002 10:41 am Post subject:
Why isn't __progname declared in a header?
|
|
|
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 |
|
 |
|