You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/02/12 21:55:34 UTC

cvs commit: apr/file_io/unix dir.c

trawick     01/02/12 12:55:34

  Modified:    file_io/unix dir.c
  Log:
  OS/390 has _POSIX_PATH_MAX but not PATH_MAX (did I hear a little bird
  say "APR_PATH_MAX?")
  
  Revision  Changes    Path
  1.51      +4 -0      apr/file_io/unix/dir.c
  
  Index: dir.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/dir.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- dir.c	2001/02/08 07:44:37	1.50
  +++ dir.c	2001/02/12 20:55:32	1.51
  @@ -154,7 +154,11 @@
       wanted &= ~(APR_FINFO_NAME);
       if (wanted)
       {
  +#if defined(PATH_MAX)
           char fspec[PATH_MAX];
  +#elif defined(_POSIX_PATH_MAX)
  +        char fspec[_POSIX_PATH_MAX];
  +#endif
           int off;
           apr_cpystrn(fspec, thedir->dirname, sizeof(fspec));
           off = strlen(fspec);
  
  
  

Re: cvs commit: apr/file_io/unix dir.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
Kevin Pilch-Bisson <ke...@pilch-bisson.net> writes:

>>(imagine the APR_MAX_PATH pseudo code here...)

> Has it been decided that this will happen?  If so, any idea when?

yes; most likely today (I started it this a.m. but got interrupted
with something else; hope to get back to it Real Soon Now)

Have fun,
-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: apr/file_io/unix dir.c

Posted by Kevin Pilch-Bisson <ke...@pilch-bisson.net>.
On Mon, Feb 12, 2001 at 04:11:55PM -0600, William A. Rowe, Jr. wrote:
> From: "Jeff Trawick" <tr...@bellsouth.net>
> Sent: Monday, February 12, 2001 3:42 PM
> 
> 
> > apr.hw:
> > 
> > Move this code from include/arch/win32/fileio.h to apr.hw but also add
> > any needed includes (what are they?):
> > 
> > #if APR_HAS_UNICODE_FS
> > /* An arbitrary size that is digestable. True max is a bit less than
> > 32000 */
> > #define APR_PATH_MAX 8192
> > #define APR_FILE_MAX MAX_PATH
> > #else /* !APR_HAS_UNICODE_FS */
> > #define APR_PATH_MAX MAX_PATH
> > #define APR_FILE_MAX MAX_PATH
> > #endif
> 
> 
> The MAX_PATH comes from windows.h, which is included right off the top in apr.hw.
> 
> 
> > apr.h.in:
> > 
> > include sys/limits.h and limits.h then
> > 
> > #if defined(PATH_MAX)
> > #define APR_PATH_MAX PATH_MAX
> > #elif defined(_POSIX_PATH_MAX)
> > #define APR_PATH_MAX _POSIX_PATH_MAX
> > #else
> > #error Fix APR_PATH_MAX for your platform.
> > #endif
> > 
> > -- 
> > Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
> >        http://www.geocities.com/SiliconValley/Park/9289/
> >              Born in Roswell... married an alien...
> > 

Has it been decided that this will happen?  If so, any idea when?

-- 
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson
kevin@pilch-bisson.net
http://www.pilch-bisson.net
PGP Public Key At http://pgp.pilch-bisson.net

Re: cvs commit: apr/file_io/unix dir.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Jeff Trawick" <tr...@bellsouth.net>
Sent: Monday, February 12, 2001 3:42 PM


> apr.hw:
> 
> Move this code from include/arch/win32/fileio.h to apr.hw but also add
> any needed includes (what are they?):
> 
> #if APR_HAS_UNICODE_FS
> /* An arbitrary size that is digestable. True max is a bit less than
> 32000 */
> #define APR_PATH_MAX 8192
> #define APR_FILE_MAX MAX_PATH
> #else /* !APR_HAS_UNICODE_FS */
> #define APR_PATH_MAX MAX_PATH
> #define APR_FILE_MAX MAX_PATH
> #endif


The MAX_PATH comes from windows.h, which is included right off the top in apr.hw.


> apr.h.in:
> 
> include sys/limits.h and limits.h then
> 
> #if defined(PATH_MAX)
> #define APR_PATH_MAX PATH_MAX
> #elif defined(_POSIX_PATH_MAX)
> #define APR_PATH_MAX _POSIX_PATH_MAX
> #else
> #error Fix APR_PATH_MAX for your platform.
> #endif
> 
> -- 
> Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
>        http://www.geocities.com/SiliconValley/Park/9289/
>              Born in Roswell... married an alien...
> 


Re: cvs commit: apr/file_io/unix dir.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
"William A. Rowe, Jr." <wr...@rowe-clan.net> writes:

> > trawick     01/02/12 12:55:34
> > 
> >   Modified:    file_io/unix dir.c
> >   Log:
> >   OS/390 has _POSIX_PATH_MAX but not PATH_MAX (did I hear a little bird
> >   say "APR_PATH_MAX?")
> 
> Yes... the 'right' fix would be good here. 

This should be pretty simple...

apr.hw:

Move this code from include/arch/win32/fileio.h to apr.hw but also add
any needed includes (what are they?):

#if APR_HAS_UNICODE_FS
/* An arbitrary size that is digestable. True max is a bit less than
32000 */
#define APR_PATH_MAX 8192
#define APR_FILE_MAX MAX_PATH
#else /* !APR_HAS_UNICODE_FS */
#define APR_PATH_MAX MAX_PATH
#define APR_FILE_MAX MAX_PATH
#endif

apr.h.in:

include sys/limits.h and limits.h then

#if defined(PATH_MAX)
#define APR_PATH_MAX PATH_MAX
#elif defined(_POSIX_PATH_MAX)
#define APR_PATH_MAX _POSIX_PATH_MAX
#else
#error Fix APR_PATH_MAX for your platform.
#endif

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: apr/file_io/unix dir.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> trawick     01/02/12 12:55:34
> 
>   Modified:    file_io/unix dir.c
>   Log:
>   OS/390 has _POSIX_PATH_MAX but not PATH_MAX (did I hear a little bird
>   say "APR_PATH_MAX?")

Yes... the 'right' fix would be good here.