[MacPorts] #69838: legacy-support: stpncpy: error: expected parameter declarator

MacPorts noreply at macports.org
Sat Apr 27 21:55:54 UTC 2024


#69838: legacy-support: stpncpy: error: expected parameter declarator
---------------------------------------+----------------------
  Reporter:  ryandesign                |      Owner:  mascguy
      Type:  defect                    |     Status:  assigned
  Priority:  Normal                    |  Milestone:
 Component:  ports                     |    Version:  2.9.3
Resolution:                            |   Keywords:
      Port:  legacy-support, R-nloptr  |
---------------------------------------+----------------------

Comment (by fhgwright):

 Note that the error involves some bizarre `stpncpy` macro, which is not
 provided by either `legacy-support` or the 10.7 SDK.

 The `legacy-support` declaration in `strings.h`:
 {{{
 extern char *stpncpy(char *dst, const char *src, size_t n);
 }}}

 The 10.7 SDK declaration in `strings.h` (assuming `__DARWIN_C_LEVEL >=
 200809L`):
 {{{
 char    *stpncpy(char *, const char *, size_t)
 __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
 }}}

 My guess is that `R-nloptr` is providing its own definition of `stpncpy()`
 as a macro, based on an unverified (and now false) assumption that it's
 not provided by the "OS" in this case.  This behavior seems like it's
 inherently incompatible with the philosophy of `legacy-support`.  It's
 probably unrelated to the SDK selection, though that seems questionable as
 well.

 The only way `legacy-support` is to blame for this is by working as
 intended.

 As the saying goes, "be careful what you wish for (#69571)". :-)

-- 
Ticket URL: <https://trac.macports.org/ticket/69838#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list