Re: Need clarification on compilation errors in PG 16.2

Поиск
Список
Период
Сортировка
От Pradeep Kumar
Тема Re: Need clarification on compilation errors in PG 16.2
Дата
Msg-id CAJ4xhP=2fA11Tjxki3wAmO8H4xakz2uLG7mZms2p6WQT-tV-ng@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Need clarification on compilation errors in PG 16.2  (Pradeep Kumar <spradeepkumar29@gmail.com>)
Список pgsql-hackers
Hi,

I found out that for using memset() library is not referred from "/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/string.h" , it referred from "/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/secure/_string.h", in that file didn't defined the memset_s() macro.

Thanks and regards
Pradeep

On Wed, May 29, 2024 at 11:30 AM Pradeep Kumar <spradeepkumar29@gmail.com> wrote:
Hello Tom,

>That's correct for recent versions of macOS.  I see you are
>building against a recent SDK:
>
>/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/string.h
>
>but I wonder if maybe the actual OS version is back-rev?

Currently Im using "MacOSX14.4.sdk" , path is "/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/string.h". When I go through the header file and search for the memset_s(), I found that library is defined in a conditional macro refer below, am I breaking the macro below?

#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
#include <sys/_types/_rsize_t.h>
#include <sys/_types/_errno_t.h>

__BEGIN_DECLS
errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
__END_DECLS
#endif

Thanks and Regards
Pradeep

On Wed, May 29, 2024 at 2:21 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Pradeep Kumar <spradeepkumar29@gmail.com> writes:
> Yes it was defined in "pg_config.h"
> /* Define to 1 if you have the `memset_s' function. */
> #define HAVE_MEMSET_S 1

That's correct for recent versions of macOS.  I see you are
building against a recent SDK:

/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/string.h

but I wonder if maybe the actual OS version is back-rev?

                        regards, tom lane

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

Предыдущее
От: Pradeep Kumar
Дата:
Сообщение: Re: Need clarification on compilation errors in PG 16.2
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: meson: Specify -Wformat as a common warning flag for extensions