Re: A few questions...

2007-07-27 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Daniel Molina Wegener <[EMAIL PROTECTED]> writes: : : Hello, : :I need information about few things, I hope someone can help : me and thanks in advance. : : a) Is there any function or variable that tells me which is the :root user UID in the s

Re: A few questions...

2007-07-26 Thread Victor Loureiro Lima
2007/7/26, John-Mark Gurney <[EMAIL PROTECTED]>: Victor Loureiro Lima wrote this message on Wed, Jul 25, 2007 at 12:14 -0300: > 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: > >Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 > >-0300: > >> 2007/7/24, John-Mark Gurney <[EM

Re: A few questions...

2007-07-25 Thread John-Mark Gurney
Victor Loureiro Lima wrote this message on Wed, Jul 25, 2007 at 12:14 -0300: > 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: > >Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 > >-0300: > >> 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: > >> >Daniel Molina Wegener wrote

Re: A few questions...

2007-07-25 Thread Victor Loureiro Lima
2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 -0300: > 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: > >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 > >-0400: > >> a) Is there any function or var

Re: A few questions...

2007-07-24 Thread John-Mark Gurney
Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 -0300: > 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: > >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 > >-0400: > >> a) Is there any function or variable that tells me which is the > >>root user

Re: A few questions...

2007-07-24 Thread Victor Loureiro Lima
2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>: Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 -0400: > a) Is there any function or variable that tells me which is the >root user UID in the system, or root always have 0 and it's >an "elegant" option to compare the

Re: A few questions...

2007-07-24 Thread John-Mark Gurney
Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 -0400: > a) Is there any function or variable that tells me which is the >root user UID in the system, or root always have 0 and it's >an "elegant" option to compare the variables or structure >members against zero.

Re: A few questions...

2007-07-24 Thread Brooks Davis
On Tue, Jul 24, 2007 at 12:37:53AM -0500, Ben Kaduk wrote: > On 7/23/07, Darren Pilgrim <[EMAIL PROTECTED]> wrote: > > Daniel Molina Wegener wrote: > > > Hello, > > > > > >I need information about few things, I hope someone can help > > > me and thanks in advance. > > > > > > a) Is there any f

Re: A few questions...

2007-07-23 Thread Ben Kaduk
On 7/23/07, Darren Pilgrim <[EMAIL PROTECTED]> wrote: Daniel Molina Wegener wrote: > Hello, > >I need information about few things, I hope someone can help > me and thanks in advance. > > a) Is there any function or variable that tells me which is the >root user UID in the system, or root

Re: A few questions...

2007-07-23 Thread Darren Pilgrim
Daniel Molina Wegener wrote: Hello, I need information about few things, I hope someone can help me and thanks in advance. a) Is there any function or variable that tells me which is the root user UID in the system, or root always have 0 and it's an "elegant" option to compare the vari

A few questions...

2007-07-23 Thread Daniel Molina Wegener
Hello, I need information about few things, I hope someone can help me and thanks in advance. a) Is there any function or variable that tells me which is the root user UID in the system, or root always have 0 and it's an "elegant" option to compare the variables or structure members

Re: A few questions about a few includes

2002-03-06 Thread Tony Finch
Lowell Gilbert <[EMAIL PROTECTED]> wrote: > >C-99 requires a fully specified type before the unspecified array (and >requires said array to be the last element in the structure). So this >example is *not* valid in C99, but the following would be: > >struct foo { >int bar; >char ar

Re: A few questions about a few includes

2002-03-04 Thread Lowell Gilbert
Harti Brandt <[EMAIL PROTECTED]> writes: > This should be > > struct foo { > char array[]; > }; > > according to C-99, on which gcc2 barfs. Don't know, whether gcc3 can > handle this. C-99 requires a fully specified type before the unspecified array (and requires said array to be the las

Re: A few questions about a few includes

2002-03-04 Thread Lowell Gilbert
Erik Trulsson <[EMAIL PROTECTED]> writes: > On Mon, Mar 04, 2002 at 09:35:29AM -0700, M. Warner Losh wrote: > > In message: <[EMAIL PROTECTED]> > > Erik Trulsson <[EMAIL PROTECTED]> writes: > > : I think it is still there (and my draft copy says the same thing). > > : I was thinking

Re: A few questions about a few includes

2002-03-04 Thread Ian
>>> Zero length arrays >>> are undefined. >> >> Well, yes, but the quesiton is *why* they are undefined. >> They are undefined only because ANSI says that they are. >> But why did they say so? > > They didn't really. They just didn't say that zero-length arrays are > allowed. (This might be cha

Re: Re: A few questions about a few includes

2002-03-04 Thread Erik Trulsson
On Mon, Mar 04, 2002 at 09:35:29AM -0700, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > Erik Trulsson <[EMAIL PROTECTED]> writes: > : I think it is still there (and my draft copy says the same thing). > : I was thinking about the original C89 standard which does not allow

Re: A few questions about a few includes

2002-03-04 Thread Harti Brandt
On Mon, 4 Mar 2002, M. Warner Losh wrote: MWL>In message: <[EMAIL PROTECTED]> MWL>Erik Trulsson <[EMAIL PROTECTED]> writes: MWL>: I think it is still there (and my draft copy says the same thing). MWL>: I was thinking about the original C89 standard which does not allow it MWL>: (and

Re: A few questions about a few includes

2002-03-04 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Erik Trulsson <[EMAIL PROTECTED]> writes: : I think it is still there (and my draft copy says the same thing). : I was thinking about the original C89 standard which does not allow it : (and does not allow incomplete array types in structs). Guess I sh

Re: A few questions about a few includes

2002-03-04 Thread Erik Trulsson
On Mon, Mar 04, 2002 at 10:29:18AM +0100, Harti Brandt wrote: > On Sun, 3 Mar 2002, Erik Trulsson wrote: > > ET>On Sun, Mar 03, 2002 at 10:27:17AM -0700, Ian wrote: > ET>> > > ET>> > In : > ET>> > > ET>> > /* > ET>> > * pargs, used to hold a copy of the command line, if it had a sane > ET>> > * l

Re: A few questions about a few includes

2002-03-04 Thread Harti Brandt
On Sun, 3 Mar 2002, Erik Trulsson wrote: ET>On Sun, Mar 03, 2002 at 10:27:17AM -0700, Ian wrote: ET>> > ET>> > In : ET>> > ET>> > /* ET>> > * pargs, used to hold a copy of the command line, if it had a sane ET>> > * length ET>> > */ ET>> > struct pargs { ET>> > u_int ar_ref; /* Referen

Re: A few questions about a few includes

2002-03-03 Thread Conrad Sabatier
Thanks for all the very interesting followups, folks. I learned something today! I really must start reading this list more often. :-) -- Conrad Sabatier <[EMAIL PROTECTED]> Bennett's Laws of Horticulture: (1) Houses are for people to live in. (2) Gardens are for plants to li

Re: A few questions about a few includes

2002-03-03 Thread Greg Black
Terry Lambert wrote: | Order of structure elements is undefined. Zero length arrays | are undefined. Also, packing is undefined. Close, but no cigar. The /order/ is defined in C89 (Section 6.5.2.1) with the following words: Within a structure object, the non-bit-field members and the

Re: A few questions about a few includes

2002-03-03 Thread Terry Lambert
"Brian T.Schellenberger" wrote: > I can't even imagine how one *would* write a compiler where this would > fail--does anybody know the putative risk that led ANSI to "ban" this (IMHO) > perfectly-reasonable bahvior? Order of structure elements is undefined. Zero length arrays are undefined. Als

Re: A few questions about a few includes

2002-03-03 Thread Brian T . Schellenberger
On Sunday 03 March 2002 01:00 pm, Erik Trulsson wrote: > On Sun, Mar 03, 2002 at 10:27:17AM -0700, Ian wrote: > > > In : > > > > > > /* > > > * pargs, used to hold a copy of the command line, if it had a sane > > > * length > > > */ > > > struct pargs { > > > u_int ar_ref; /* Reference

Re: A few questions about a few includes

2002-03-03 Thread Brian T . Schellenberger
On Sunday 03 March 2002 10:19 am, Conrad Sabatier wrote: > Am I just completely stupid, or do we have a few things that could use a > little cleaning up in /usr/include as well as in the man page for kvm_*? > > System: FreeBSD 4.5-STABLE > > 2) If compiling with the -pedantic switch, one might see

Re: A few questions about a few includes

2002-03-03 Thread Erik Trulsson
On Sun, Mar 03, 2002 at 10:27:17AM -0700, Ian wrote: > > > > In : > > > > /* > > * pargs, used to hold a copy of the command line, if it had a sane > > * length > > */ > > struct pargs { > > u_int ar_ref; /* Reference count */ > > u_int ar_length; /* Length */ > > u_char ar_ar

Re: A few questions about a few includes

2002-03-03 Thread Ian
> > In : > > /* > * pargs, used to hold a copy of the command line, if it had a sane > * length > */ > struct pargs { > u_int ar_ref; /* Reference count */ > u_int ar_length; /* Length */ > u_char ar_args[0]; /* Arguments */ > }; > > This does indeed seem to make little o

A few questions about a few includes

2002-03-03 Thread Conrad Sabatier
Am I just completely stupid, or do we have a few things that could use a little cleaning up in /usr/include as well as in the man page for kvm_*? System: FreeBSD 4.5-STABLE 1) The man page for the kvm_* functions lists the following #include dependencies: #include #include #