disallow direct inclussion of
Hi folks! I think we should disallow direct inclusion of in Glibc, any comments? Sort of like: #ifndef _USE_LINUX # error "Never include directly; use standard headers instead." #endif If you (specialy Roland) like the idea, I can send it to the Glibc lists. (and write a patch). -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 06:05:13PM +, Robert Millan wrote: > I think we should disallow direct inclusion of in Glibc, any > comments? This is not an issue related to the Hurd at all. If you think that this should be done, for whatever reason, you need to talk to the glibc maintainers. Thanks, Marcus -- `Rhubarb is no Egyptian god.' GNU http://www.gnu.org[EMAIL PROTECTED] Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/ [EMAIL PROTECTED] http://www.marcus-brinkmann.de/ ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 06:16:47PM +0200, Marcus Brinkmann wrote: > On Sat, Oct 04, 2003 at 06:05:13PM +, Robert Millan wrote: > > I think we should disallow direct inclusion of in Glibc, any > > comments? > > This is not an issue related to the Hurd at all. If you think that this > should be done, for whatever reason, you need to talk to the glibc > maintainers. I know. But this seriously affects portability to non-Linux-based systems, which includes GNU/Hurd. I'm really sick of encountering programs that break because of arbitrarily including stuff. Today I just recieved a patch for a program I maintain that adds an #include on just to get the PATH_MAX macro. I'm going mad with this kind of stuff. If people really want Linux-specific features, let them define _USE_LINUX or something like that. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 06:48:36PM +, Robert Millan wrote: > On Sat, Oct 04, 2003 at 06:16:47PM +0200, Marcus Brinkmann wrote: > > On Sat, Oct 04, 2003 at 06:05:13PM +, Robert Millan wrote: > > > I think we should disallow direct inclusion of in Glibc, any > > > comments? > > > > This is not an issue related to the Hurd at all. If you think that this > > should be done, for whatever reason, you need to talk to the glibc > > maintainers. > > I know. But this seriously affects portability to non-Linux-based systems, > which includes GNU/Hurd. > > I'm really sick of encountering programs that break because of arbitrarily > including stuff. Today I just recieved a patch for a program I > maintain that adds an #include on just to get the PATH_MAX > macro. I'm going mad with this kind of stuff. > > If people really want Linux-specific features, let them define _USE_LINUX or > something like that. That's all fine, I guess, but affects other systems beside GNU/Hurd just as well. If headers needs to be protected against inclusion must be decided by whoever provides these headers. This would be glibc in your case. Thanks, Marcus -- `Rhubarb is no Egyptian god.' GNU http://www.gnu.org[EMAIL PROTECTED] Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/ [EMAIL PROTECTED] http://www.marcus-brinkmann.de/ ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 06:05:13PM +, Robert Millan wrote: > I think we should disallow direct inclusion of in Glibc, any > comments? There don't exist any headers in glibc, they come from Linux. Jeroen Dekkers ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:03:37PM +0200, Marcus Brinkmann wrote: > > That's all fine, I guess, but affects other systems beside GNU/Hurd just as > well. If headers needs to be protected against inclusion must > be decided by whoever provides these headers. This would be glibc in your > case. Of course. I just wanted to check with you people to see what the general opinion is. Since it sounds fine to you, I'll post to Glibc mailing lists in short. I'd like to hear Roland's opnion first, though. Roland, are you around? -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
> > > I think we should disallow direct inclusion of in Glibc, any > > > comments? > > > > This is not an issue related to the Hurd at all. If you think that this > > should be done, for whatever reason, you need to talk to the glibc > > maintainers. > > I know. But this seriously affects portability to non-Linux-based systems, > which includes GNU/Hurd. > I'm really sick of encountering programs that break because of arbitrarily > including stuff. Today I just recieved a patch for a program I > maintain that adds an #include on just to get the PATH_MAX > macro. I'm going mad with this kind of stuff. > > If people really want Linux-specific features, let them define _USE_LINUX or > something like that. Same problem for BSD porters. This is _really_ annoying for every non-Linux porter/maintainer out there. I'd strongly support such a move; perhaps starting with a deprecation #warn-ing, and later changing this to a hard #error. > Robert Millan -- Farid Hajji. http://www.farid-hajji.net/address.html ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:13:32PM +0200, Jeroen Dekkers wrote: > On Sat, Oct 04, 2003 at 06:05:13PM +, Robert Millan wrote: > > I think we should disallow direct inclusion of in Glibc, any > > comments? > > There don't exist any headers in glibc, they come from > Linux. IIRC, Glibc build process takes them from specified location and installs them in /usr/include/linux/. So there's room to apply some patches. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
> > I think we should disallow direct inclusion of in Glibc, any > > comments? > There don't exist any headers in glibc, they come from > Linux. Perhaps glibc should provide its own wrappers which would spew out warnings, but still #include the real linux headers (I assume something from /usr/src/linux/include/*.h or whatever) anyway? > Jeroen Dekkers -- Farid Hajji. http://www.farid-hajji.net/address.html ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:43:01PM +0200, Farid Hajji wrote: > > > I think we should disallow direct inclusion of in Glibc, any > > > comments? > > There don't exist any headers in glibc, they come from > > Linux. > > Perhaps glibc should provide its own wrappers which > would spew out warnings, but still #include the real linux headers > (I assume something from /usr/src/linux/include/*.h or whatever) > anyway? This is just too much of a burden for little gain. Everybody who uses headers in general applications doesn't know what he is doing. They will just #define USE_LINUX or whatever to get rid of the warning/error. The real solution here is teaching people to do the right thing, not putting silly things in glibc which don't solve the problem at all. Jeroen Dekkers ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:39:18PM +0200, Farid Hajji wrote: > > Same problem for BSD porters. This is _really_ annoying for every > non-Linux porter/maintainer out there. I'd strongly support such > a move; perhaps starting with a deprecation #warn-ing, and later > changing this to a hard #error. I'll raise the issue on Glibc mailing lists, and CC bug-hurd. Please make sure you people get to participate. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:36:54PM +, Robert Millan wrote: > Of course. I just wanted to check with you people to see what the general > opinion is. The general opinion about linux header files can not be found on the Hurd development list. > Since it sounds fine to you, I'll post to Glibc mailing lists in short. I didn't meant to say that your change is fine. Your motivation is a good one. I have no helpful opinion on the technical nature of your change. In case it wasn't clear the first time around: this topic is totally off-topic ;) Thanks, Marcus -- `Rhubarb is no Egyptian god.' GNU http://www.gnu.org[EMAIL PROTECTED] Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/ [EMAIL PROTECTED] http://www.marcus-brinkmann.de/ ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:35:31PM +, Robert Millan wrote: > On Sat, Oct 04, 2003 at 07:13:32PM +0200, Jeroen Dekkers wrote: > > On Sat, Oct 04, 2003 at 06:05:13PM +, Robert Millan wrote: > > > I think we should disallow direct inclusion of in Glibc, any > > > comments? > > > > There don't exist any headers in glibc, they come from > > Linux. > > IIRC, Glibc build process takes them from specified location and installs them > in /usr/include/linux/. > > So there's room to apply some patches. No they don't. Some distribution put those headers in a package called glibc, but glibc itself doesn't do anything with them (except using it in the glibc code itself of course). Jeroen Dekkers ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:45:16PM +, Robert Millan wrote: > I'll raise the issue on Glibc mailing lists, and CC bug-hurd. Please make > sure you people get to participate. Why CC bug-hurd? This has nothing at all to do with the Hurd. It doesn't affect us at all what the linux headers contain, so please don't give a wrong impression. Thanks, Marcus -- `Rhubarb is no Egyptian god.' GNU http://www.gnu.org[EMAIL PROTECTED] Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/ [EMAIL PROTECTED] http://www.marcus-brinkmann.de/ ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:58:20PM +0200, Marcus Brinkmann wrote: > On Sat, Oct 04, 2003 at 07:45:16PM +, Robert Millan wrote: > > I'll raise the issue on Glibc mailing lists, and CC bug-hurd. Please make > > sure you people get to participate. > > Why CC bug-hurd? This has nothing at all to do with the Hurd. It doesn't > affect us at all what the linux headers contain, so please don't give a > wrong impression. I believe you're not looking at it from the perspective of a porter who has to fix hundreds of broken packages which include . Please do that and my point will be made obvious. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:43:01PM +0200, Farid Hajji wrote: > > > I think we should disallow direct inclusion of in Glibc, any > > > comments? > > There don't exist any headers in glibc, they come from > > Linux. > > Perhaps glibc should provide its own wrappers which > would spew out warnings, but still #include the real linux headers > (I assume something from /usr/src/linux/include/*.h or whatever) > anyway? Good idea, I'll propose that as it sounds better than maintaining a set of patches. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:50:20PM +0200, Jeroen Dekkers wrote: > > This is just too much of a burden for little gain. Everybody who uses > headers in general applications doesn't know what he is > doing. They will just #define USE_LINUX or whatever to get rid of the > warning/error. The real solution here is teaching people to do the > right thing, not putting silly things in glibc which don't solve the > problem at all. Not if the error message is good an explanative. For example, it could point to a README in /usr/include/linux/README that explains why including Linux headers is generaly a bad idea, and why the USE_LINUX macro should not be used unless we really need to access kernel interfaces. There's a difference between people who don't know what they are doing, and people who are plainly dumbass idiots. If you tell them what's correct to do, most of them will learn what's correct to do. Anyway, the people fixing build errors after appliing this change are not likely the same that those who introduced the insanity in first place, so there's little chance that they arbitrarily define USE_LINUX. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
Such header changes are just never going to happen, for many reasons. But accept it. The way to move forward is to look for other solutions to help people avoid writing needless implementation dependencies into their packages. One straightforward idea is a tool to examine the header use in source code or as part of a build, and flag nonportable header file names. On debian-hurd it would be appropriate to discuss making such a tool part of all standard debian builds so that making a package included flagging these header file build dependencies implicitly, and then automating the process of harrassing people whose packages have unnecessary build dependencies. ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
Robert Millan <[EMAIL PROTECTED]> writes: > > Why CC bug-hurd? This has nothing at all to do with the Hurd. It doesn't > > affect us at all what the linux headers contain, so please don't give a > > wrong impression. > > I believe you're not looking at it from the perspective of a porter who > has to fix hundreds of broken packages which include . Please > do that and my point will be made obvious. Correct me if I am wrong, but isn't debian-hurd for porting issues? Anyway, just keep irritating people some Hurd related list is the wrong list is just bureaucratic, sorry for that. I just don't understand what glibc has to do with improving the way people code, especially when dealing with linux header files. I understand your frustration, but I do not think this just is the right way to fix the problem IMHO. As usual, please correct me if I'm wrong. -- Marco ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sun, Oct 05, 2003 at 12:21:14AM +0200, Marco Gerards wrote: > > Correct me if I am wrong, but isn't debian-hurd for porting issues? debian-hurd is for debian issues, but maybe I was wrong at posting here and it should be in bug-hurd (too late to change that now, though). > I just don't understand what glibc has to do with improving the way > people code, especially when dealing with linux header files. Actualy Roland just pointed that the non-Debian world doesn't necessarily put Linux headers in Glibc package, so actualy this should be discussed in Linux mailing lists. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
> Are you willing to do reasonable discussion, or is this just going to be a > claim without justification? I'm giving you a very accurate prediction, and being lazy about explaining the responses I know you will get if you ask for it. Feel free to experience it for yourself if you don't want to take my word for it. If you propose it to libc and linux developers, you will get explanations aplenty. I'd be happy to discuss ways that might actually fly to address the problem that motivated your idea. > I'm involved in boring porting tasks that you're not. I do avoid it now, but don't think I haven't done years of it in the hardest times for it and deeply appreciate the kinds of things you want. > And I'm so tired to go through the same crap over and over just because > we allow programmers to do really insane things they should never do. Like I said, it would be perfectly reasonable on debian-hurd or other debian lists to discuss ways to prevent packages from being built without being fixed or annotated properly. This doesn't belong on bug-hurd, which is about systems where no header file exists. ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: [ams@kemisten.nu: Re: gcc 3.3.x and profile]
The GCC spec looks fine to me. The initialization and finalization code that makes things happen is in libc, so that's where your problem is. gcrt[01].o makes sure that __gmon_start__ gets called (libc/csu/gmon-start.c). That initializer function calls __monstartup to start profiling and uses atexit to have _mcleanup called at process exit (see libc/gmon/gmon.c). Look at whether those are being called and if so what they are doing that is wrong. For issues about that code, post to <[EMAIL PROTECTED]>. Thanks, Roland ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
RE: disallow direct inclussion of
Hello from Gregg C Levine Here's my opinion, not that I was asked. On my Linux systems, both of them running the same distribution, GLIBC contains the current libraries, and C headers for building things. And the Linux system headers, come from the kernel. Typically there is a symlink which points to them, somewhere inside the regular include directory. Marco, your nearly there. And yes this should be discussed, but not on the list, we'll alienate everyone else there. Or annoy them, before alienation. Incidentally I did try to install the latest blob from Debian, via a CD from LWE this year, it didn't like my NIC. Twice in fact. --- Gregg C Levine [EMAIL PROTECTED] "The Force will be with you...Always." Obi-Wan Kenobi "Use the Force, Luke." Obi-Wan Kenobi (This company dedicates this E-Mail to General Obi-Wan Kenobi ) (This company dedicates this E-Mail to Master Yoda ) > -Original Message- > From: [EMAIL PROTECTED] [mailto:bug-hurd- > [EMAIL PROTECTED] On Behalf Of Marco Gerards > Sent: Saturday, October 04, 2003 6:21 PM > To: Robert Millan > Cc: [EMAIL PROTECTED]; Marcus Brinkmann > Subject: Re: disallow direct inclussion of > > Robert Millan <[EMAIL PROTECTED]> writes: > > > > Why CC bug-hurd? This has nothing at all to do with the Hurd. It doesn't > > > affect us at all what the linux headers contain, so please don't give a > > > wrong impression. > > > > I believe you're not looking at it from the perspective of a porter who > > has to fix hundreds of broken packages which include . Please > > do that and my point will be made obvious. > > Correct me if I am wrong, but isn't debian-hurd for porting issues? > Anyway, just keep irritating people some Hurd related list is the > wrong list is just bureaucratic, sorry for that. > > I just don't understand what glibc has to do with improving the way > people code, especially when dealing with linux header files. I > understand your frustration, but I do not think this just is the right > way to fix the problem IMHO. > > As usual, please correct me if I'm wrong. > > -- > Marco > > > > ___ > Bug-hurd mailing list > [EMAIL PROTECTED] > http://mail.gnu.org/mailman/listinfo/bug-hurd ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 07:54:43PM +0200, Jeroen Dekkers wrote: > > > > IIRC, Glibc build process takes them from specified location and installs them > > in /usr/include/linux/. > > > > So there's room to apply some patches. > > No they don't. Some distribution put those headers in a package called > glibc, but glibc itself doesn't do anything with them (except using it > in the glibc code itself of course). Linux headers are generaly found in /usr/src/linux, not /usr/include/linux. The only reason to install them in /usr/include hierrachy is so they can be used by Glibc. Too bad some people abuse that. In Debian, /usr/include/linux is provided by Glibc. Who provides these headers on other distributions? -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 06:10:21PM -0400, Roland McGrath wrote: > Such header changes are just never going to happen, for many reasons. But > accept it. Are you willing to do reasonable discussion, or is this just going to be a claim without justification? > The way to move forward is to look for other solutions to help > people avoid writing needless implementation dependencies into their > packages. One straightforward idea is a tool to examine the header use in > source code or as part of a build, and flag nonportable header file names. That takes sorting out legitimate uses from illegitimate ones, and the whole cicle of sending patches so that they sit there eternaly and pinging them untill someone bothers to apply. I'm involved in boring porting tasks that you're not. And I'm so tired to go through the same crap over and over just because we allow programmers to do really insane things they should never do. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd
Re: disallow direct inclussion of
On Sat, Oct 04, 2003 at 06:29:50PM -0400, Roland McGrath wrote: > > Are you willing to do reasonable discussion, or is this just going to be a > > claim without justification? > > I'm giving you a very accurate prediction, and being lazy about explaining > the responses I know you will get if you ask for it. Feel free to > experience it for yourself if you don't want to take my word for it. If > you propose it to libc and linux developers, you will get explanations > aplenty. I'd be happy to discuss ways that might actually fly to address > the problem that motivated your idea. I can count you as a libc developer, but this issue actualy seems to belong to Linux developers, so I'll deal with them and get their explanation. > Like I said, it would be perfectly reasonable on debian-hurd or other > debian lists to discuss ways to prevent packages from being built without > being fixed or annotated properly. This doesn't belong on bug-hurd, which > is about systems where no header file exists. Ok. I understand this is off-topic and leave it here. -- Robert Millan "[..] but the delight and pride of Aule is in the deed of making, and in the thing made, and neither in possession nor in his own mastery; wherefore he gives and hoards not, and is free from care, passing ever on to some new work." -- J.R.R.T, Ainulindale (Silmarillion) ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd