bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: llseek() return value is different for ia32 and ppc.


From: Andreas Schwab
Subject: Re: llseek() return value is different for ia32 and ppc.
Date: Mon, 04 Feb 2002 10:47:18 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux)

"R Sreelatha" <address@hidden> writes:

|> /*testcase.c*/
|> 
/*******************************************************************************************/
|> #include <unistd.h>
|> #include <sys/types.h>
|> #include <sys/stat.h>
|> #include <fcntl.h>
|> 
|> #define BUFSIZ 100
|> main()
|> {
|>     int fildes = 0;
|>     int ret = 0;
|> 
|>     if ((fildes = open("./tmpfile", O_RDWR | O_CREAT, 0644)) == -1)
|>         perror("open() failed");
|> 
|>   if ((ret = llseek(fildes, (loff_t)(80 * BUFSIZ), SEEK_SET)) == -1)

The llseek return type is loff_t.  Also, you must declare llseek yourself,
it's not in any header.  Better use lseek64 anyway.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]