Re: Faster StrNCpy

Поиск
Список
Период
Сортировка
От Benny Amorsen
Тема Re: Faster StrNCpy
Дата
Msg-id m3sli5v8l3.fsf@ursa.amorsen.dk
обсуждение исходный текст
Ответ на Re: Faster StrNCpy  (mark@mark.mielke.cc)
Список pgsql-hackers
>>>>> "ZA" == Zeugswetter Andreas DCP SD <ZeugswetterA@spardat.at> writes:

ZA> Yes, but it obviously does not in some ports, and that was the
ZA> main problem as I interpreted it.

strncpy is part of POSIX; I highly doubt anyone gets it wrong. Getting
sane semantics from it does require manually writing null to the
last location in the buffer.

If you need the null byte padding feature of strncpy, it seems a bit
silly to replace it with strlcpy. Particularly if the only reason is
performance. Down that road lies pglibc.


/Benny




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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Updated version of FAQ_Solaris
Следующее
От: "Mark Woodward"
Дата:
Сообщение: Netflix Prize data