Its in linux/limits.h
.
#define PATH_MAX 4096 /* # chars in a path name including nul */
#include <linux/limits.h>
char current_path[PATH_MAX];
PATH_MAX
has some flaws as mentioned in this blog (thanks paulsm4)
More Related Contents:
- Should C compilers immediately free "further unused" memories? [closed]
- Where is the header file on Linux? Why can’t I find ? [duplicate]
- Is errno thread-safe?
- Working of fork() in linux gcc [duplicate]
- How to verify if a void pointer (void *) is one of two data types?
- How to include needed C library using gcc?
- What is the advantage of GCC’s __builtin_expect in if else statements?
- “undefined reference to `pow'” even with math.h and the library link -lm [duplicate]
- Build .so file from .c file using gcc command line
- Finding out what the GCC include path is [duplicate]
- How Can I debug a C program on Linux?
- How to check if a given file descriptor stored in a variable is still valid?
- Detecting 64bit compile in C
- Disable variable-length automatic arrays in gcc
- Why do I have to define LD_LIBRARY_PATH with an export every time I run my application?
- How can a shared library (.so) call a function that is implemented in its loader code?
- Fused multiply add and default rounding modes
- Status of __STDC_IEC_559__ with modern C compilers
- How can I include a needed C library using GCC?
- Implementation of sizeof operator
- GCC 4.7 Source Character Encoding and Execution Character Encoding For String Literals?
- calling assembly function from c
- How to set up a cron job to run an executable every hour?
- Is free() zeroing out memory?
- Building a shared library using gcc on Linux and MinGW on Windows
- Process Linkage Table and Global Offset Table
- Why both clang and gcc only give a warning when there is a space after backslash if C standard says that whitespace is forbidden?
- How does GCC behave if passed conflicting compiler flags?
- getrandom syscall in C not found
- argv: Sanitizing wildcards