lkml.org 
[lkml]   [2006]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New filesystem for Linux
>>>> So anyway, why do you need _llseek? Can't you just use lseek() like
>>>> everyone else?
>>>
>>> Because I want it to work with glibc 2.0 that I still use on one machine.
>>
>> BTW. is it some interaction with symbols defined elsewhere or were _syscall
>> macros dropped altogether? Which glibc symbol should I use in #ifdef to tell if
>> glibc has 64-bit support?
>
> -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
>
> I think the second is not needed.

I see, but the question is how do I test in C preprocessor that glibc is
sufficiently new to react on them?

Now I changed it to:
#ifdef __linux__
#if !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)
#include <asm/unistd.h>
#ifdef __NR__llseek
#define use_llseek
static _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *,
res, uint, wh);
#endif
#endif

So we see if someone else runs into problem.

Mikulas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-03 19:51    [W:0.069 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site