Project

General

Profile

Actions

Feature #3188

closed

ignore the comment in limits.h and define NAME_MAX

Added by Rich Lowe over 10 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

There's a bunch of standards handwaving and lunacy in limits.h about why we don't define NAME_MAX.

We should ignore it, delete the comment, and define it for the sake of compatibility (presumably to the same value as MAXNAMELEN).

As best as I can tell, the hand-wringing in the header is for the sake of pcfs and s5fs!

Actions #1

Updated by Igor Pashev over 10 years ago

Yes, finally :-)

Actions #2

Updated by Gary Mills almost 8 years ago

Surely it would be (MAXNAMELEN-1) which would be 255. NAME_MAX is not supposed to include a terminating NUL.

Actions #3

Updated by Alain O'Dea over 7 years ago

I got bitten by this trying to build and install fswatch. I had to create a trivial patch to define NAME_MAX to get past it.

Actions #5

Updated by Electric Monk about 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 9c0752ac0dc05794d2f8a8b4521d55e2b3f63247

commit  9c0752ac0dc05794d2f8a8b4521d55e2b3f63247
Author: Andrew Stormont <astormont@racktopsystems.com>
Date:   2017-04-27T00:22:44.000Z

    3188 ignore the comment in limits.h and define NAME_MAX
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Reviewed by: Sam Zaydel <szaydel@racktopsystems.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF