AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20071002100657.14665c39@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<maxim.kozlovsky@onstor.com>,<jobi.ariyamannil@onstor.com>,<jonathan.goldick@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E05CB8111@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 2 Oct 2007 10:07:45 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
Cc: "Jobi Ariyamannil" <jobi.ariyamannil@onstor.com>, "Jonathan Goldick"
 <jonathan.goldick@onstor.com>
Subject: Re: use of atol in our code
Message-ID: <20071002100745.630e1407@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E05CB8111@onstor-exch02.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E05CB7FFD@onstor-exch02.onstor.net>
	<20071001185814.6a9b4b3e@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E05CB8111@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Tue, 2 Oct 2007 08:34:07 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> I would not use atol() anyway regardless of what it returns. According
> to the same man page it is deprecated and you can't really check for a
> conversion error. I usually convert them to strtol(l) when I see them.
> 
> Why would we compile user space to i32lp64 on cougar? We do not have
> any use of the pointers that size. Can Linux support mixed mode
> (kernel 64 bit, user 32 bit)?

Never fear.  User space is ILP32, and isn't going to change any time
soon.  Just the kernel is 64bit.  And I agree about atol(), it is
hideously obsolete and error prone.  We should change that code
whenever the opportunity arises.

> >-----Original Message-----
> >From: Andy Sharp
> >Sent: Monday, October 01, 2007 6:58 PM
> >To: Jobi Ariyamannil
> >Cc: Maxim Kozlovsky; Jonathan Goldick
> >Subject: Re: use of atol in our code
> >
> >On Mon, 1 Oct 2007 18:38:40 -0700 "Jobi Ariyamannil"
> ><jobi.ariyamannil@onstor.com> wrote:
> >
> >> Hi,
> >>
> >>
> >>
> >> I see a lot of places we call atol() to initialize 64 bit values.
> >>
> >> But atol() returns long of size 32 bits.
> >
> >According to the man page, it returns long, the size of which would
> >be target dependent.  I believe we are compiling I32LP64 on the
> >sibytes, which would include the management cpu on cougar as well
> >now.  ILP32 on the R9K but of course.
> >
> >Cheers,
> >
> >a
