Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#121 NAME_MAX not defined on Solaris

Bob Koutsky

When compiling mrxvt 0.5.3 with USE_FIFO enabled on Solaris 10, I get the following error:

init.c: In function `rxvt_init_vars':
init.c:813: error: `NAME_MAX' undeclared (first use in this function)
init.c:813: error: (Each undeclared identifier is reported only once
init.c:813: error: for each function it appears in.)
init.c:815: warning: int format, pid_t arg (arg 3)
init.c:813: warning: unused variable `fifo_name'
*** Error code 1

/usr/include/limits.h on this systems contains following:

* POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
* related text states:
* A definition of one of the values from Table 2-5 shall be omitted from the
* <limits.h> on specific implementations where the corresponding value is
* equal to or greater than the stated minimum, but where the value can vary
* depending on the file to which it is applied. The actual value supported for
* a specific pathname shall be provided by the pathconf() (5.7.1) function.
* This is clear that any machine supporting multiple file system types
* and/or a network can not include this define, regardless of protection
* by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
* #define NAME_MAX 14