Re: C macro for maximum path length?

2020-12-04 Thread David Crayford
* #define PIPE_BUF */ Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of David Crayford Sent: Thursday, December 3, 2020 5:32 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C macro for maximum path length? PATH_MAX on

Re: C macro for maximum path length?

2020-12-04 Thread Paul Gilmartin
On Fri, 4 Dec 2020 09:25:07 -0800, Charles Mills wrote: >@Gil, weren't you going to try a mkdir wombat/cd wombat endless loop and see >where it failed? > My latest attempt: # ### #! /bin/sh # Doc: Test limits of path length (PATH_MAX) # and directory nesting

Re: C macro for maximum path length?

2020-12-04 Thread Charles Mills
ERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Friday, December 4, 2020 7:02 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C macro for maximum path length? It would be a courtesy to leave a citation when appending to a thread. A reader might wish to refer to the ped text. On Fri, 4 Dec 2020 08:1

Re: C macro for maximum path length?

2020-12-04 Thread Paul Gilmartin
It would be a courtesy to leave a citation when appending to a thread. A reader might wish to refer to the ped text. On Fri, 4 Dec 2020 08:19:34 -0500, Peter Relson wrote: > >The real question is not "how long can a path be [today]?" but rather "how >long might a path be at any future point

Re: C macro for maximum path length?

2020-12-04 Thread Peter Relson
The real question is not "how long can a path be [today]?" but rather "how long might a path be at any future point when this compilation is running?" And that's why z/OS will never change the maximum path length by default (I actually thought it was 1024, but my knowledge is only from what

Re: C macro for maximum path length?

2020-12-03 Thread Mike Schwab
M-MAIN@LISTSERV.UA.EDU > Subject: Re: C macro for maximum path length? > > Sorry, here is the error message. > https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.cs3cod0/ftp550113.htm > z/OS Unix System Services specifies the maximum file name of 255 and &g

Re: C macro for maximum path length?

2020-12-03 Thread Charles Mills
@LISTSERV.UA.EDU Subject: Re: C macro for maximum path length? Sorry, here is the error message. https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.cs3cod0/ftp550113.htm z/OS Unix System Services specifies the maximum file name of 255 and path of 1023. https://www.ibm.com

Re: C macro for maximum path length?

2020-12-03 Thread Mike Schwab
Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Charles Mills > Sent: Thursday, December 3, 2020 9:41 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: C macro for maximum path length? > > Thanks @Gord, yes, I saw pathconf(). > > I am starting to

Re: C macro for maximum path length?

2020-12-03 Thread Mike Schwab
s conundrum? > > Charles > > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Charles Mills > Sent: Thursday, December 3, 2020 9:41 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: C macro for maximum path len

Re: C macro for maximum path length?

2020-12-03 Thread Charles Mills
Subject: Re: C macro for maximum path length? Thanks @Gord, yes, I saw pathconf(). I am starting to "get" the problem. > I suspect there's a buffer overrun hazard associated with a statically > compiled > PATH_MAX. Never mind the exact lack of a macro and never mind z/OS.

Re: C macro for maximum path length?

2020-12-03 Thread Charles Mills
t;work buffer" was kind of a lazy programmer approach. Thanks all for your patience and explanations. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Thursday, December 3, 2020 9:08 AM To: IBM-MAIN@LISTSER

Re: C macro for maximum path length?

2020-12-03 Thread Paul Gilmartin
On Thu, 3 Dec 2020 11:49:05 -0500, Gord Tomlin wrote: >On 2020-12-03 10:12 AM, Charles Mills wrote: >> I believe you, but why then is the macro undefined? Why is the definition >> now commented out? >> I suspect there's a buffer overrun hazard associated with a statically compiled PATH_MAX.

Re: C macro for maximum path length?

2020-12-03 Thread Gord Tomlin
On 2020-12-03 10:12 AM, Charles Mills wrote: I believe you, but why then is the macro undefined? Why is the definition now commented out? >From (actually CEE.SCEEH.H(LIMITS)) on z/OS V2R4: /* * POSIX.1 1990 Section 2.8.5 Statement 1065 - * these macros "shall be omitted on specific *

Re: C macro for maximum path length?

2020-12-03 Thread Charles Mills
#define PIPE_BUF */ Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of David Crayford Sent: Thursday, December 3, 2020 5:32 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C macro

Re: C macro for maximum path length?

2020-12-03 Thread David Crayford
PATH_MAX on z/OS is 1023. This is documented in lots of error messages and BPX assembler services. > On 3 Dec 2020, at 7:16 am, Charles Mills wrote: > > I have some code that compiles both under Windows Visual Studio and z/OS > XLC. > > In Windows the maximum length of a file path is

Re: C macro for maximum path length?

2020-12-02 Thread Paul Gilmartin
On Wed, 2 Dec 2020 16:43:11 -0800, Charles Mills wrote: >This code has been changed since I last compiled it on Z but I don't think I >changed that reference. It appears that PATH_MAX went away somewhere between >V2R2 and V2R4. I see some comments in limits.h that are consistent with that. >

Re: C macro for maximum path length?

2020-12-02 Thread Charles Mills
@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Wednesday, December 2, 2020 3:25 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C macro for maximum path length? On Wed, 2 Dec 2020 15:16:10 -0800, Charles Mills wrote: >I have some code that compiles both under Windows Visual Studio and z/OS >XLC. > &g

Re: C macro for maximum path length?

2020-12-02 Thread Paul Gilmartin
On Wed, 2 Dec 2020 15:16:10 -0800, Charles Mills wrote: >I have some code that compiles both under Windows Visual Studio and z/OS >XLC. > >In Windows the maximum length of a file path is defined by _MAX_PATH and >__MAX_PATH (I guess MS thinks two macros are better than one). > >What is the

C macro for maximum path length?

2020-12-02 Thread Charles Mills
I have some code that compiles both under Windows Visual Studio and z/OS XLC. In Windows the maximum length of a file path is defined by _MAX_PATH and __MAX_PATH (I guess MS thinks two macros are better than one). What is the equivalent macro for XLC? Failing that, what *is* the maximum path