Project

General

Profile

Feature #3188

ignore the comment in limits.h and define NAME_MAX

Added by Rich Lowe about 8 years ago. Updated over 2 years ago.

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

0%

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

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!

History

#1

Updated by Igor Pashev about 8 years ago

Yes, finally :-)

#2

Updated by Gary Mills about 5 years ago

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

#3

Updated by Alain O'Dea almost 5 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.

#5

Updated by Electric Monk over 3 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>

Also available in: Atom PDF