Skip to content

[BUG] many of _POSIX_xxx constants seem inappropriate #15464

Closed

Description

@yamt

Description / Steps to reproduce the issue

limits.h has the "Configurable limits required by POSIX" section
with _POSIX_xxx and _POSIX2_xxx constants.

for example,

#define _POSIX_NAME_MAX       CONFIG_NAME_MAX

it seems inappropriate to me as these constants are not meant to be configurable.

My understanding is that these values are the minimum values allowed for POSIX-conforming platforms.
For example, _POSIX_PATH_MAX is the minimum acceptable value for PATH_MAX and so on.
Thus these values should not depend on any NuttX configs at all.

reference:
search "Minimum Acceptable Value" in https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html

On which OS does this issue occur?

[OS: Mac]

What is the version of your OS?

macOS 15.2

NuttX Version

master

Issue Architecture

[Arch: all]

Issue Area

[Area: Api]

Verification

  • I have verified before submitting the report.

Activity

  1. added
    Type: Bug
    on Jan 8, 2025
  2. added
    Arch: all
    Area: Api
    OS: Mac
    on Jan 8, 2025
  3. xiaoxiang781216 commented on Jan 22, 2025

    @xiaoxiang781216
    Contributor

    why POSIX constant shouldn't be configurable from Kconfig? it perfect to allow the different OS or even the same OS with the different configuration choice a different value, otherwise, spec should give a fix number.

  4. yamt commented on Jan 27, 2025

    @yamt
    ContributorAuthor

    why POSIX constant shouldn't be configurable from Kconfig? it perfect to allow the different OS or even the same OS with the different configuration choice a different value, otherwise, spec should give a fix number.

    _POSIX_NAME_MAX is the Minimum Acceptable Value of NAME_MAX.
    actually posix gives a fixed number. (14)

    otoh, it's ok to make NAME_MAX depend on Kconfig.

  5. added a commit that references this issue on Oct 18, 2026
    35c6d67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: allArea: ApiOS: MacType: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions