apache / apache/nuttx

[BUG] many of _POSIX_xxx constants seem inappropriate

Open
#15,464 2 comments 0 reactions 0 assignees View on GitHub
Arch: all Area: Api OS: Mac Type: Bug
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### 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

- [X] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Research direction

Start with the “Configurable limits required by POSIX” section in limits.h and compare its _POSIX_xxx and _POSIX2_xxx definitions with the referenced POSIX limits.h requirements. Determine which definitions incorrectly depend on NuttX configuration values; done means the affected constants reflect the specified minimum acceptable values independently of configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.