signed short fd

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема signed short fd
Дата
Msg-id d1378u$2ekt$2@news.hub.org
обсуждение исходный текст
Ответы Re: signed short fd  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
We have the following definition in fd.c:

typedef struct vfd
{signed short fd;   /* current FD, or VFD_CLOSED if none */...
} Vfd;

but seems we use Vfd.fd as an integer, say in fileNameOpenFile() we have:
vfdP->fd = BasicOpenFile(fileName, fileFlags, fileMode);

So is there any special reason we don't worry that convert an integer to
short will not lose data? Maybe we make the assumption that all OS will
implement "fd" as an array index and is at most 2^16 this big, but why not
use an integer?

Regards,
Qingqing







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

Предыдущее
От: Robert Creager
Дата:
Сообщение: Re: date_trunc problem in HEAD
Следующее
От: Greg Stark
Дата:
Сообщение: Re: [BUGS] We are not following the spec for HAVING without GROUP