Bug 1347 - LLONG_MAX v LONGLONG_MAX
Summary: LLONG_MAX v LONGLONG_MAX
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 4.6p1
Hardware: PPC AIX
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_4_8
  Show dependency treegraph
 
Reported: 2007-07-30 14:38 AEST by David Leonard
Modified: 2008-03-31 15:20 AEDT (History)
1 user (show)

See Also:


Attachments
define LLONG_MAX if LONGLONG_MAX is defined (579 bytes, patch)
2007-07-30 14:39 AEST, David Leonard
no flags Details | Diff
define LLONG_MAX on AIX and HP-UX (761 bytes, patch)
2007-09-24 23:03 AEST, David Leonard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Leonard 2007-07-30 14:38:31 AEST
On AIX, LLONG_MAX is known as LONGLONG_MAX


/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c: In function `test':
/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c:32: warning: implicit declaration
 of function `strtonum'
/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c: In function `main':
/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c:49: `LLONG_MAX' undeclared (first
 use in this function)
/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c:49: (Each undeclared identifier i
s reported only once
/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c:49: for each function it appears 
in.)
/data/rc/u/davidl/openssh/openssh/openbsd-compat/regress/strtonumtest.c:53: `LLONG_MIN' undeclared (first
 use in this function)
gmake[3]: Leaving directory `/var/tmp/build.openssh.build/build/openssh-4.6p1/open

/usr/include/sys/limits.h:#define LONGLONG_MAX  (0x7fffffffffffffffLL)
/usr/include/sys/limits.h:#define LONGLONG_MIN  (-LONGLONG_MAX - 1)

I notice that there is a test for HAVE_LLONG_MAX in configure.in ... maybe that could be used instead of what i did in the attached patch??
Comment 1 David Leonard 2007-07-30 14:39:14 AEST
Created attachment 1333 [details]
define LLONG_MAX if LONGLONG_MAX is defined
Comment 2 David Leonard 2007-09-24 23:03:11 AEST
Created attachment 1360 [details]
define LLONG_MAX on AIX and HP-UX

This bug also affects HP-UX. I've attached an updated patch that uses LONG_LONG_MAX from HP-UX's <limits.h> as well.

This allows "make compat-tests" to pass on AIX and HP-UX.
Comment 3 Darren Tucker 2008-03-09 17:10:39 AEDT
Patch applied, will be in 4.8.  Thanks!
Comment 4 Damien Miller 2008-03-31 15:20:50 AEDT
Fix shipped in 4.9/4.9p1 release.