I have some question.
i study about a _llseek function
If you have a function called '_llseek', then it is specific to your
implementation. The leading underscore is a clue to this (although not
as solid a clue as it was before C99). Another clue which you had but
snipped from your quotation from the man page is the necessity to use a
non-standard header, commonly <unistd.h> for _llseek or llseek on
implementations that have them. Questions about such
implementation-specific functions are best asked in newsgroups, mailing
lists, or technical support for those implementations. The
implementation-specific experts hang out (surprise!) in the
implementation-specific newsgroups.
Neither _llseek nor llseek are standard in either POSIX or standard C.
I will offer some off-topic advice however.
Notice that this advise is off-topic, and is as reliable as information
on automobile transmissions answered by your local shoe salesmen, so
check your documentation or go to a Linux newsgroup to be sure it is
correct.
[Standard C (topical)]
The standard C functions are fseek and fsetpos. fseek takes a long
argument for the offset, while fsetpos takes a fpos_t argument for the
position. It is possible that an fpos_t is a unsigned long long on your
implementation and suffices for your purposes: you will need to check
your documentation. It is possible that even the long offset of fseek
will suffice. If not
[llseek (offtopic)]
Many Linux implementations provide an llseek function (no leading
underscore-. It typically takes a single offset_t (a non-standard type,
usually an unsigned long long or the same type as a size_t) rather than
a pair of unsigned longs as your _llseek does. Further, it usually
returns an offset_t rather than an int. It will usually be a better choice.
Definitely, Man page on linux show me that below
--------------------------------------------------------------
int _llseek(unsigned int fd, unsigned long offset_high,
unsigned
long offset_low, loff_t *result, unsigned int whence);
------------------------------------------------------------------
Of course , this function has five parameters!!
But if i get code by strace!
This is one reason to avoid non-standard functions. It appears that the
non-standard _llseek used in the code you are examining is defined in a
different way from the non-standard _llseek used by your implementation.
This is not a surprise: non-standard functions have no standard
definition, for goodness' sake. What is surprising is those square
braces on the third argument ('[0]'). This makes it suspect whether
this code is in C at all.
what's meanning four parameters?
Heaven knows. Ask the people who wrote the code for their
implementation of the non-standard _llseek. Better, use the more common
Linux-implementation provided function llseek. And even better, if
possible, use the the standard function, either fsetpos or fseek if
applicable.