Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jan 13, 2019

The only one of interest to me is PATH_MAX, needed for a portability bug fix in dmd.

Ping the port maintainers @joakim-noah @jacob-carlborg @dkgroot @nrTQgc @redstar for adding missing systems.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + druntime#2460"

@dkgroot
Copy link
Contributor

dkgroot commented Jan 13, 2019

@ibuclaw
Can you please include this (so that i don't have to create a seperate pull request / review cycle).
If you do want a separate pull request instead, just let me know (i am not allowed to edit your PR, otherwise i would have fixed it up myself).

else version (DragonFlyBSD) 
{
    ///
    enum MAX_CANON      = 255;
    ///
    enum MAX_INPUT      = 255;
    ///
    enum NAME_MAX       = 255;
    ///
    enum PATH_MAX       = 1024;
    ///
    enum PIPE_BUF       = 512;
}
else version (NETBSD)
{
    ///
    enum MAX_CANON      = 255;
    ///
    enum MAX_INPUT      = 255;
    ///
    enum NAME_MAX       = 511;
    ///
    enum PATH_MAX       = 1024;
    ///
    enum PIPE_BUF       = 512;
}
else version (OPENBSD)
{
    ///
    enum MAX_CANON      = 255;
    ///
    enum MAX_INPUT      = 255;
    ///
    enum NAME_MAX       = 255;
    ///
    enum PATH_MAX       = 1024;
    ///
    enum PIPE_BUF       = 512;
}

I took the values from syslimits.h, which is not the same as plain limits.h, which mostly contains the POSIX values.

References for the other two BSD's:

FYI: DragonFlyBSD is based on an older branch of FreeBSD, so for these older type include types, the simple guess is just to replicate the values from FreeBSD and add a little todo to verify. (Not sure if that is appreciated or not by other maintainers)

Side Note: NAME_MAX is not 100% clear in it's use (might need some doc). Also it could be confused with stdio.d:FILENAME_MAX. which can differ. AFAIK: FILENAME_MAX is part of the c standard. NAME_MAX is not required to exist on every platform. Just my 2 cents.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 13, 2019

Thanks @dkgroot

@dlang-bot dlang-bot merged commit 29953e4 into dlang:master Jan 14, 2019
@ibuclaw ibuclaw deleted the fslimits branch January 14, 2019 08:52
chunorig pushed a commit to chunorig/gcc-kludges that referenced this pull request Jan 26, 2019
Commits merged from druntime.

    Fix struct tls_index definition on x32
    dlang/druntime#2354

    Update SectionGroup signatures to match on all targets
    dlang/druntime#2401

    Fix issue 19128 - argument to alloca may be too large
    dlang/druntime#2409

    Define some common filesystem limits in core.stdc.limits
    dlang/druntime#2460

    Use version Darwin instead of OSX in core.sys.posix.aio
    dlang/druntime#2470

Commits merged from phobos.

    Don't run HardFloat tests on SoftFloat systems
    dlang/phobos#5358

    Remove reliance on stdin, stdout, stderr being aliasable
    dlang/phobos#5718

    Solaris: add import clock_gettime to currStdTime
    dlang/phobos#5807

    Don't print debug messages when building unittests
    dlang/phobos#6827

    Add HPPA support to phobos
    Fixes https://gcc.gnu.org/PR89054
    dlang/phobos#6836

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268293 138bc75d-0d04-0410-961f-82ee72b054a4
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants