Re: Need clarification on compilation errors in PG 16.2

From: Pradeep Kumar <spradeepkumar29(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Long Song <songlong88(at)126(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Need clarification on compilation errors in PG 16.2
Date: 2024-05-29 06:00:56
Message-ID: CAJ4xhPkWjLHSD-zpyOHf5rdmzDWKGNS=Jjx9oVWV5wLSLtn7PA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Pradeep Kumar <spradeepkumar29(at)gmail(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pradeep Kumar 2024-05-29 06:19:02 Re: Need clarification on compilation errors in PG 16.2
Previous Message Peter Smith 2024-05-29 05:11:01 Re: Improving the latch handling between logical replication launcher and worker processes.