Changeset 2113


Ignore:
Timestamp:
Jun 29, 2005, 6:06:03 AM (20 years ago)
Author:
bird
Message:

o On glibc lot's of limits.h stuff is included from direct.h because of

need for NAME_MAX, let's do something similar.

o Corrected MAXNAMLEN / d_name field length.

Location:
trunk/src/emx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/ChangeLog.LIBC

    • Property cvs2svn:cvs-rev changed from 1.72 to 1.73
    r2112 r2113  
    1010        o Added memrawchr and strchrnul from glibc, enabling us to shop .S
    1111          files from glibc at the same time.
     12        o On glibc lot's of limits.h stuff is included from direct.h because of
     13          need for NAME_MAX, let's do something similar.
     14        o Corrected MAXNAMLEN / d_name field length.
    1215
    13162005-06-27: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • trunk/src/emx/include/sys/dirent.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2112 r2113  
    3838 * FreeBSD 5.1
    3939 * @changed bird: Merged in all the EMX stuff.
     40 * @changed bird: glibc hack.
     41 * @changed bird: MAXNAMLEN vs NAME_MAX.
    4042 */
    4143
     
    4547#include <sys/cdefs.h>
    4648#include <sys/_types.h>
     49#if defined(__USE_GNU) && !defined(MAXNAMLEN)
     50/* Fixing a common problem with tests using NAME_MAX without including limits.h. */
     51# include <sys/param.h>
     52#endif
     53
    4754
    4855/*
     
    6370        __uint8_t  d_namlen;            /* length of string in d_name */
    6471#if __BSD_VISIBLE
    65 #ifndef MAXNAMLEN  /* bird: emx */
    66 #define MAXNAMLEN       260 /* bird: changed from 255. */
    67 #endif             /* bird: emx */
     72#ifndef MAXNAMLEN                   /* bird */
     73#ifdef NAME_MAX                     /* bird */
     74#define MAXNAMLEN       NAME_MAX    /* bird */
     75#else                               /* bird */
     76#define MAXNAMLEN       256
     77#endif                              /* bird */
     78#endif                              /* bird */
    6879        char    d_name[MAXNAMLEN + 1];  /* name must be no longer than this */
    6980#else
    70         char    d_name[260 + 1];        /* bird: changed from 255. */ /* name must be no longer than this */
     81        char    d_name[255 + 1];        /* name must be no longer than this */
    7182#endif
    72 /* bird: Extra EMX fields - start */
     83/* bird: Extra EMX fields - start */ /** @todo move these up before the name! LIBC07 */
    7384        __uint8_t  d_attr;              /* OS file attributes        */
    7485        __uint16_t d_time;              /* OS file modification time */
Note: See TracChangeset for help on using the changeset viewer.