Is PATH_MAX really that big or do I have something wrong?
Is PATH_MAX really that big or do I have something wrong?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
What tools are you using to get that value and assuming you are on one of the UNIX's are you using the getconf utility?
oh I just did this:
Code:printf("%d\n", PATH_MAX);
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
What OS platform are you on? Show the entire code instead of just the printf() statement.
I think it must have been:
Code:#include <linux/limits.h> #include <stdio.h> int main () { printf("%d\n", PATH_MAX); }
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}
So then 4k is correct as the PATH_MAX symbolic constant is defined in the <limits.h> include file on Unix/Linux.
So there you can have deeply nested directories and/or really long names for them.
that's not a nest, it's obscene
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Original DOS was 8.3 and no subdirectories, and people complained it was too little.
Now 4K is too much, and people complain it's too much.
*shrug*
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
4k is perfectly reasonable for a path. I suppose this is under Linux?