Ticket #5942 (new feature request)

Opened 14 months ago

Last modified 8 months ago

implement POSIX confstr() in System/Posix/Unistd.hsc

Reported by: clint Owned by:
Priority: normal Milestone: 7.6.2
Component: libraries/unix Version: 7.4.1
Keywords: confstr Cc: clint@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description


Attachments

0001-Add-binding-for-POSIX-confstr-_CS_PATH-and-LFS-varia.patch Download (2.2 KB) - added by clint 14 months ago.
patch implementing confstr()

Change History

Changed 14 months ago by clint

patch implementing confstr()

Changed 14 months ago by clint

  • cc clint@… added

Changed 14 months ago by pcapriotti

  • status changed from new to patch
  • difficulty set to Easy (less than 1 hour)
  • milestone set to 7.6.1

Changed 10 months ago by simonpj

  • owner set to simonmar

Changed 10 months ago by simonmar

  • owner simonmar deleted
  • status changed from patch to new

confstr is fine, but most of those values (e.g. _CS_LFS_CFLAGS) are non-portable as far as I can tell. The only portable one is _CS_PATH.

See e.g. the POSIX pages that list the standard defines:  http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html and  http://pubs.opengroup.org/onlinepubs/009695399/functions/confstr.html

Changed 10 months ago by clint

So can they be included conditionally?

Changed 10 months ago by simonmar

In general it's not OK to have platform-conditional APIs in the unix package. Typically a missing function will throw an exception (e.g. getSlaveTerminalName), or fall back to a portable version (e.g. unsetEnv). Where there are constants or symbols that need to be conditional, we use a .Exts module (see e.g. System.Posix.Signals.Exts).

Changed 8 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2
Note: See TracTickets for help on using tickets.