RT RT/krbdev.mit.edu: Ticket #2379 sane_hostname.c fails to compile on HP UX 10.20 Signed in as guest.
[Logout]

[Home] [Search] [Configuration]

[Display] [History] [Basics] [Dates] [People] [Links] [Jumbo]

 
 

 The Basics  
Id
2379
Status
resolved
Worked
0 min
Priority
0/0
Queue
krb5
 

 Keyword Selections  
Component
Version_reported
Version_Fixed
  • 1.4
Target_Version
Tags
 

 Relationships  
Depends on:
Depended on by:
Parents:
Children:

Refers to:
Referred to by:
 
 Dates  
Created: Wed Mar 10 17:33:38 2004
Starts: Not set
Started: Fri Jul 16 17:12:32 2004
Last Contact: Fri Sep 10 18:37:13 2004
Due: Not set
Updated: Mon Nov 15 22:22:06 2004 by tlyu
 

 People  
Owner
 raeburn
Requestors
 DEEngert@anl.gov
Cc
 
AdminCc
 
 

 More about DEEngert@anl.gov  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 

History   Display mode: [Brief headers] [Full headers]
      Wed Mar 10 17:33:40 2004  DEEngert@anl.gov - Ticket created    
     
Date: Wed, 10 Mar 2004 16:33:51 -0600
From: "Douglas E. Engert" <deengert@anl.gov>
To: krb5-bugs@mit.edu
Subject: sane_hostname.c fails to compile on HP UX 10.20


util/pty/sane_hostname.c failes to compile on a HP UX 10.20
as h_errno is not defined.

sane_hostname.c includes pty-int.h that includes netdb.h

Later sane_hostname.c includes fake_addrinfo.h
that defines _XOPEN_SOURCE_EXTENDED then includes netdb.h
so as to get h_errno defined. But since netdb.h was already
included the hack has no effect.

So here is hack to the hack:

*** ,fake-addrinfo.h    Mon Dec 15 20:19:09 2003
--- fake-addrinfo.h     Wed Mar 10 16:10:03 2004
***************
*** 552,557 ****
--- 552,560 ----
  /* Hack for HPUX, to get h_errno.  */
  # define _XOPEN_SOURCE_EXTENDED 1
  # include <netdb.h>
+ # ifndef h_ERRNO_KT_DEFINED
+ extern int h_errno;
+ # endif
  # undef _XOPEN_SOURCE_EXTENDED
  #endif

On HP UX 11.0, 11.11 and 11.23 the original hack is not needed
as h_errno is defined by the first include of netdb.h. They also
define h_ERRNO_KT_DEFINED at that time, so it can be used
to test in h_errno needs to be defined in an earlier HP system.

The patch might even be reworked to not have to define
the _XOPEN_SOURCE_EXTENDED as in HP 10.20 the define is always a int.

--

 Douglas E. Engert  <DEEngert@anl.gov>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439
 (630) 252-5444


Download (untitled) 1.2k
      Fri Jul 16 17:12:32 2004  raeburn - Status changed from new to open    
      Fri Jul 16 17:12:33 2004  raeburn - Given to raeburn    
      Fri Jul 16 17:12:33 2004  raeburn - Correspondence added    
     
From: raeburn@mit.edu
Subject: CVS Commit

* fake-addrinfo.h: Don't include netdb.h, since port-sockets.h already does.
* port-sockets.h: Define _XOPEN_SOURCE_EXTENDED around inclusion of netdb.h if
it's not defined and not Windows, as fake-addrinfo.h used to do; otherwise just
include it normally.


To generate a diff of this commit:



	cvs diff -r1.448 -r1.449 krb5/src/include/ChangeLog
	cvs diff -r1.46 -r1.47 krb5/src/include/fake-addrinfo.h
	cvs diff -r1.20 -r1.21 krb5/src/include/port-sockets.h


Download (untitled) 463b
      Fri Jul 16 17:55:15 2004  raeburn - Correspondence added    
     
From: raeburn@mit.edu
Subject: CVS Commit

* pty-int.h: Include port-sockets.h instead of netdb.h and netinet/in.h.


To generate a diff of this commit:



	cvs diff -r1.127 -r1.128 krb5/src/util/pty/ChangeLog
	cvs diff -r1.20 -r1.21 krb5/src/util/pty/pty-int.h


Download (untitled) 219b
      Fri Jul 16 17:55:51 2004  raeburn - Correspondence added    
     
[DEEngert@anl.gov - Wed Mar 10 17:33:40 2004]:

> util/pty/sane_hostname.c failes to compile on a HP UX 10.20
> as h_errno is not defined.
>
> sane_hostname.c includes pty-int.h that includes netdb.h
>
> Later sane_hostname.c includes fake_addrinfo.h
> that defines _XOPEN_SOURCE_EXTENDED then includes netdb.h
> so as to get h_errno defined. But since netdb.h was already
> included the hack has no effect.

Doug, could you please see if the changes I just checked in on the trunk
fix this problem for you?  I know port-sockets.h is including netdb.h,
but now it should define _XOPEN_SOURCE_EXTENDED like fake-addrinfo.h
used to, and pty-int.h includes port-sockets.h.  If in fact that's the
first inclusion of netdb.h, I think it'll get the h_errno declaration.


Download (untitled) 767b
      Fri Sep 10 18:37:10 2004  tlyu - Status changed from open to resolved    
      Fri Sep 10 18:37:11 2004  tlyu - Correspondence added    
     
From: tlyu@mit.edu
Subject: CVS Commit

	* port-sockets.h: Remove _XOPEN_SOURCE_EXTENDED hack for netdb.h,
	as it can cause inconsistencies between headers.  It significantly
	broke HP-UX 10.20 anyway.


To generate a diff of this commit:



	cvs diff -r1.464 -r1.465 krb5/src/include/ChangeLog
	cvs diff -r1.22 -r1.23 krb5/src/include/port-sockets.h


Download (untitled) 311b
      Mon Nov 15 22:22:05 2004  tlyu - Version_Fixed 1.4 added