Re: Large file support available

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Large file support available
Дата
Msg-id Pine.LNX.4.44.0208212027550.1376-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Large file support available  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Large file support available
Список pgsql-hackers
Tom Lane writes:

> /usr/include/sys/resource.h: In function `getrlimit':
> /usr/include/sys/resource.h:168: warning: implicit declaration of function `__getrlimit64'
> /usr/include/sys/resource.h: In function `setrlimit':
> /usr/include/sys/resource.h:170: warning: implicit declaration of function `__setrlimit64'
>
> for essentially every file in the system.  A little digging shows that
> this is happening because _FILE64 is defined and _LARGEFILE64_SOURCE
> is not; this is evidently a Bad Idea on HPUX.

You're supposed to define _LARGEFILE64_SOURCE if you want to use functions
like open64(), fseek64(), getrlimit64(), etc. in your source.  We don't
want those, obviously.

What is happening here is that evidently the system headers effectively
redefine getrlimit() to point to getrlimit64() if FILE_OFFSET_BITS=64,
which is the usual strategy for all the I/O functions.  But you're not
supposed to have to define _LARGEFILE64_SOURCE for this, because the
change is supposed to be transparent.

If the {s|g}etrlimit warnings are indeed the only ones (i.e., none about
open, fseek, write, read, etc.) then this is either a bug or there's
something wrong in the include file order or something like that.  Which
way is sys/resource.h included anyway?

If there's no way to fix it then we can add a definition of
_LARGEFILE64_SOURCE to hpux.h and consider further action.

-- 
Peter Eisentraut   peter_e@gmx.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Large file support available
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: bison news