On Fri, Aug 04, 2006 at 03:33:33PM +0300, Tommi Raulahti wrote:
> On OSF/1, limits.h doesn't contain those LONG_LONG_MAX and
> ULONG_LONG_MAX and this causes (of course) compile error. Is there any
> prefered workaround with these (that doesn't break alot of things

Try this patch.

-- 
   Alexander.                      | http://www.yars.free.net/~lav/   
Index: strtol.c
===================================================================
RCS file: /home/lav/cvsroot/lftp/lib/strtol.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 strtol.c
--- strtol.c    23 Apr 1998 21:00:00 -0000      1.1.1.1
+++ strtol.c    7 Aug 2006 11:28:10 -0000
@@ -102,6 +102,9 @@ extern int errno;
 # define LONG_MAX LONG_LONG_MAX
 # undef ULONG_MAX
 # define ULONG_MAX ULONG_LONG_MAX
+# ifndef ULONG_LONG_MAX
+#  define ULONG_LONG_MAX ((unsigned long long) ~(unsigned long long) 0)
+# endif
 # if __GNUC__ == 2 && __GNUC_MINOR__ < 7
    /* Work around gcc bug with using this constant.  */
    static const unsigned long long int maxquad = ULONG_LONG_MAX;

Reply via email to