Ticket #3: rpm-path_max.patch

File rpm-path_max.patch, 1.4 kB (added by atkac, 3 years ago)

proposed patch

  • rpm-4.6.0-rc1/lib/query.c

    old new  
    55 
    66#include "system.h" 
    77 
    8 #ifndef PATH_MAX 
    9 # define PATH_MAX 255 
    10 #endif 
    11  
    128#include <inttypes.h> 
    139 
    1410#include <rpm/rpmcli.h> 
  • rpm-4.6.0-rc1/misc/realpath.c

    old new  
    1919extern int errno; 
    2020#endif 
    2121 
    22 #ifndef PATH_MAX 
    23 #ifdef _POSIX_VERSION 
    24 #define PATH_MAX _POSIX_PATH_MAX 
    25 #else 
    26 #ifdef MAXPATHLEN 
    27 #define PATH_MAX MAXPATHLEN 
    28 #else 
    29 #define PATH_MAX 1024 
    30 #endif 
    31 #endif 
    32 #endif 
    33  
    3422#define MAX_READLINKS 32 
    3523 
    3624#ifdef __STDC__ 
  • rpm-4.6.0-rc1/system.h

    old new  
    185185#include <limits.h> 
    186186#endif 
    187187 
     188#ifndef PATH_MAX 
     189#ifdef _POSIX_PATH_MAX 
     190#define PATH_MAX _POSIX_PATH_MAX 
     191#elif defined MAXPATHLEN 
     192#define PATH_MAX MAXPATHLEN 
     193#else 
     194#define PATH_MAX 256 
     195#endif 
     196#endif 
     197 
    188198#if HAVE_ERR_H 
    189199#include <err.h> 
    190200#endif