This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: p{read,write}{,64} mips n64 changes


On Mar 15, 2003, Andreas Jaeger <aj at suse dot de> wrote:

> Alexandre Oliva <aoliva at redhat dot com> writes:
>> @@ -59,8 +65,13 @@ __libc_pread (fd, buf, count, offset)
>> {
>> /* First try the syscall.  */
>> assert (sizeof (offset) == 4);
>> +#if defined _ABI64 && _MIPS_SIM == _ABI64
>> +     result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
>> +			      offset);
>> +#else
>> result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
>> __LONG_LONG_PAIR (offset >> 31, offset));

> Can't we use a macro here that does the right thing?

I suppose I could just redefine __LONG_LONG_PAIR such that it returned
its second argument in the n64 case, in these 4 files.  How does this
sound?  We'd still need the special case in the prototype.  Do you see
any way to clean this up further?

Would you prefer a different macro, or is redefining __LONG_LONG_PAIR
ok?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]