Thomas Munro <thomas.munro@enterprisedb.com> writes:
> --enable-dtrace produces compiler warnings about const correctness,
> except on macOS. That's because Apple's dtrace produces function
> declarations in probes.h that take strings as const char * whereas
> AFAIK on all other operating systems they take char * (you can see
> that possibly recent difference in Apple's version of dt_header_decl()
> in dt_program.c). People have complained before[1].
Yeah, it's a bit annoying, although AFAICT hardly anyone uses dtrace.
> Maybe we should do what the Perl people do[2] and post-process the
> generated header file to add const qualifiers? Please see attached.
+1 for the idea. I notice that Perl's version of this is careful
not to munge lines that already contain "const" ... do we need to
worry about that?
regards, tom lane