Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAXINT redefined warning on HP-UX 10.20 #505

Closed
p5pRT opened this issue Sep 9, 1999 · 4 comments
Closed

MAXINT redefined warning on HP-UX 10.20 #505

p5pRT opened this issue Sep 9, 1999 · 4 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Sep 9, 1999

Migrated from rt.perl.org#1351 (status was 'resolved')

Searchable as RT1351$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 9, 1999

From lewart@www.cvm.uiuc.edu


Both "configure" and "make" generate the following warnings for pp_sys.c​:
  In file included from /usr/include/hpsecurity.h​:22,
  from /usr/include/shadow.h​:8,
  from pp_sys.c​:5​:
  /usr/include/values.h​:27​: warning​: `MAXINT' redefined
  /ext/gcc-2.95.1/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.1/include/sys/param.h​:46​: warning​: this is the location of the previous definition

Here is the preprocessing history​:
1) pp_sys.c​:19 #include "perl.h"
1a) perl.h​:473 #include <sys/param.h>
1b) <sys/param.h>​:46 #define MAXINT 0x7fffffff
2) pp_sys.c​:25 #include <shadow.h>
2a) /usr/include/shadow.h​:8 #include <hpsecurity.h>
2b) /usr/include/hpsecurity.h​:22 #include <values.h>
2c) /usr/include/values.h​:27 #define MAXINT (~HIBITI)

My work-around was to insert an "#undef MAXINT" in pp_sys.c just before
the "#include <shadow.h>"​:
  /* Shadow password support for solaris - pdo@​cs.umd.edu
  * Not just Solaris​: at least HP-UX, IRIX, Linux.
  * the API is from SysV. --jhi */
  +#undef MAXINT
  #include <shadow.h>
  #endif

However, this will probably need some sort of "if defined(__hpux__)"
conditional. Does <shadow.h> define MAXINT on other systems?

Thanks,
Dan
d-lewart@​uiuc.edu



Site configuration information for perl 5.00561​:

Configured by lewart at Mon Sep 6 14​:01​:38 CDT 1999.

Summary of my perl5 (revision 5.0 version 5 subversion 61) configuration​:
  Platform​:
  osname=hpux, osvers=10.20, archname=PA-RISC1.1
  uname='hp-ux www b.10.20 a 9000715 2013547832 two-user license '
  config_args='-de -Dcc=gcc -Dprefix=/ext/perl5.005_61'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  use64bits=undef usemultiplicity=undef
  Compiler​:
  cc='gcc', optimize='-O', gccversion=2.95.1 19990816 (release)
  cppflags='-D_HPUX_SOURCE -I/usr/local/include'
  ccflags ='-D_HPUX_SOURCE -I/usr/local/include'
  stdchar='unsigned char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='ld', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
  libs=-lnsl_s -lndbm -lgdbm -ldb -ldld -lm -lc -lndir -lcrypt -lsec
  libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
  cccdlflags='-fpic', lddlflags='-b -L/usr/local/lib'

Locally applied patches​:
 


@​INC for perl 5.00561​:
  /ext/perl5.005_61/lib/5.00561/PA-RISC1.1
  /ext/perl5.005_61/lib/5.00561
  /ext/perl5.005_61/lib/site_perl/5.00561/PA-RISC1.1
  /ext/perl5.005_61/lib/site_perl
  .


Environment for perl 5.00561​:
  HOME=/home/lewart
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/local/bin​:/usr/bin​:/usr/ccs/bin​:/usr/contrib/bin​:/opt/nettladm/bin​:/opt/pd/bin​:/usr/bin/X11​:/usr/contrib/bin/X11​:/opt/upgrade/bin
  PERL_BADLANG (unset)
  SHELL=/usr/bin/ksh
  SHLIB_PATH (unset)

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 9, 1999

From @jhi

Daniel S. Lewart writes​:

This is a bug report for perl from d-lewart@​uiuc.edu,
generated with the help of perlbug 1.27 running under perl 5.00561.

-----------------------------------------------------------------
Both "configure" and "make" generate the following warnings for pp_sys.c​:
In file included from /usr/include/hpsecurity.h​:22,
from /usr/include/shadow.h​:8,
from pp_sys.c​:5​:
/usr/include/values.h​:27​: warning​: `MAXINT' redefined
/ext/gcc-2.95.1/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.1/include/sys/param.h​:46​: warning​: this is the location of the previous definition

Here is the preprocessing history​:
1) pp_sys.c​:19 #include "perl.h"
1a) perl.h​:473 #include <sys/param.h>
1b) <sys/param.h>​:46 #define MAXINT 0x7fffffff
2) pp_sys.c​:25 #include <shadow.h>
2a) /usr/include/shadow.h​:8 #include <hpsecurity.h>
2b) /usr/include/hpsecurity.h​:22 #include <values.h>
2c) /usr/include/values.h​:27 #define MAXINT (~HIBITI)

My work-around was to insert an "#undef MAXINT" in pp_sys.c just before
the "#include <shadow.h>"​:
/* Shadow password support for solaris - pdo@​cs.umd.edu
* Not just Solaris​: at least HP-UX, IRIX, Linux.
* the API is from SysV. --jhi */
+#undef MAXINT
#include <shadow.h>
#endif

However, this will probably need some sort of "if defined(__hpux__)"
conditional. Does <shadow.h> define MAXINT on other systems?

Not on Solaris, IRIX, or Linux. :-)

HP-UX seems to be very good at messing up (MAX|INT)+ constants
(UINT32_MAX was the previous case.)

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 9, 1999

From @gsar

On Thu, 09 Sep 1999 18​:40​:21 +0300, Jarkko Hietaniemi wrote​:

HP-UX seems to be very good at messing up (MAX|INT)+ constants
(UINT32_MAX was the previous case.)

Leads me to wonder whether we should be using PERL_MAXINT rather
than MAXINT, etc.

Sarathy
gsar@​activestate.com

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 9, 1999

From @jhi

Gurusamy Sarathy writes​:

On Thu, 09 Sep 1999 18​:40​:21 +0300, Jarkko Hietaniemi wrote​:

HP-UX seems to be very good at messing up (MAX|INT)+ constants
(UINT32_MAX was the previous case.)

Leads me to wonder whether we should be using PERL_MAXINT rather
than MAXINT, etc.

Eh? We are not using MAXINT, we are using PERL_INT_MAX...

This was just a warning from HP-UX that it is tripping over its
multiple MAXINTs (because Perl's #includes tickled the wrong way.)

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.