Changeset 147

Show
Ignore:
Timestamp:
09/06/08 13:27:15 (3 months ago)
Author:
dezperado
Message:

Added a spec file as suggested by jeff.
Replaced <limits.h> inclusion with <climits> if possible.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • config.h.in

    r146 r147  
    138138/* Defined, if libpng support is enabled */ 
    139139#undef FIM_WITH_LIBPNG 
     140 
     141/* Define to 1 if you have the <climits> header file. */ 
     142#undef HAVE_CLIMITS 
    140143 
    141144/* Define to 1 if you have the <cstdio> header file. */ 
  • configure.ac

    r146 r147  
    172172AC_CHECK_HEADERS([linux/kd.h], [break], AC_MSG_ERROR([[Cannot find linux/kd.h.  Fim requires it!.]])) 
    173173 
    174 AC_CHECK_HEADERS([limits.h], [break], AC_MSG_ERROR([[Cannot find limits.h.  Fim requires it!.]])) 
     174AC_CHECK_HEADERS([climits limits.h], [break], AC_MSG_ERROR([[Cannot find limits.h nor climits.  Fim requires it!.]])) 
    175175 
    176176AC_CHECK_SIZEOF([int]) 
  • src/fim.h

    r141 r147  
    6060#endif 
    6161 
     62#ifdef HAVE_CLIMITS 
     63 #include <climits> 
     64 /* From: 
     65  * ISO C++ 14882: 18.2.2  Implementation properties: C library  
     66  * we get some more stuff than limits.h. */ 
     67#else 
    6268 #ifdef HAVE_LIMITS_H 
    6369 /* According to IEEE Std 1003.1-2001,  
    6470  * this should define _POSIX_PATH_MAX 
    6571  * */ 
    66  #include <limits.h> 
    67  #else 
    68   #ifndef _POSIX_PATH_MAX 
    69  /* I don't know in what case could arise this situation, but this would be the fix :*/ 
    70    #define _POSIX_PATH_MAX 4096 
    71   #endif 
     72  #include <limits.h> 
    7273 #endif 
     74#endif 
     75#ifndef _POSIX_PATH_MAX 
     76 /* I don't know in what case could arise this situation  
     77  * (no limits.h nor climits : i guess a badly configured system), 
     78  * but this would be the fix :*/ 
     79 #define _POSIX_PATH_MAX 4096 
     80#endif 
    7381 
    7482#if 0