Small patch for Hurd

Поиск
Список
Период
Сортировка
Искать
От
Oliver Elphick
Тема
Small patch for Hurd
Дата
Msg-id
200108031537.f73Fb5C6015818@linda.lfix.co.uk
Список
Дерево обсуждения
Small patch for Hurd "Oliver Elphick" <olly@lfix.co.uk>
Re: Small patch for Hurd Bruce Momjian <pgman@candle.pha.pa.us>
Re: Small patch for Hurd Bruce Momjian <pgman@candle.pha.pa.us>
This patch is because Hurd does not support NOFILE.  It is against current
cvs.

The Debian bug report says, "The upstream source makes use of NOFILE
unconditionalized.  As the Hurd doesn't have an arbitrary limit on the
number of open files, this is not defined.  But _SC_OPEN_MAX works fine
and returns 1024 (applications can increase this as they want), so I
suggest the below diff.  Please forward this upstream, too."


*** pgsql.orig/src/backend/storage/file/fd.c	Fri Aug  3 16:28:46 2001
--- pgsql/src/backend/storage/file/fd.c	Fri Aug  3 16:29:19 2001
***************
*** 290,297 ****
--- 290,302 ---- 		no_files = sysconf(_SC_OPEN_MAX); 		if (no_files == -1) 		{
+ # tweak for Hurd, which does not support NOFILE
+ #ifdef NOFILE 			elog(DEBUG, "pg_nofile: Unable to get _SC_OPEN_MAX using sysconf(); using 
%d", NOFILE); 			no_files = (long) NOFILE;
+ #else
+ 			elog(FATAL, "pg_nofile: Unable to get _SC_OPEN_MAX using sysconf() and 
NOFILE is undefined");
+ #endif 		} #endif 


This report was from Marcus Brinkmann 
В списке pgsql-hackers по дате отправления
От: Zeugswetter Andreas SB
Дата:
От: Tom Lane
Дата:
FAQ