Bug 101717

Summary: hpux not defined when compiling rpmio
Product: [Retired] Red Hat Linux Reporter: Dano Carroll <dano>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: parisc11   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-16 00:10:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Change hpux defines to __hpux
none
Same fix of hpux define fro rpmrpc.c none

Description Dano Carroll 2003-08-05 23:50:29 UTC
Description of problem:

For some reason, hpux is not a defined symbol when compiling rpmio on
HP-UX. The curious thing is that hpux is defined when compiling
beecrypt. I haven't been able to find the definitions anywhere.
If I changed the checks in fts.c for hpux to __hpux, then fts.c
compiles fine. The attached patch makes this change.

Version-Release number of selected component (if applicable):

4.1

How reproducable:

Always

Steps to Reproduce:
1. Extract source from tar file
2. Apply patches from bugs 97662, 97887, 97907
3. ./configure --prefix=/usr/local --without-python (I don't think the options
matter, thought)
4. make
    
Actual results:

source='fts.c' object='fts.lo' libtool=yes \
depfile='.deps/fts.Plo' tmpdepfile='.deps/fts.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I.
-I.. -I. -I.. -I../popt -I../zlib    -g -O2 -D_GNU_SOURCE -D_REENTRANT -Wall
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c
-o fts.lo `test -f 'fts.c' || echo './'`fts.c
rm -f .libs/fts.lo
/usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../popt -I../zlib -g
-O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes
-Wmissing-prototypes -Wno-char-subscripts -c fts.c -MT fts.lo -MD -MP -MF
.deps/fts.TPlo  -fPIC -DPIC -o .libs/fts.lo
fts.c: In function `Fts_open':
fts.c:135: warning: implicit declaration of function `__errno_location'
fts.c:135: error: invalid type argument of `unary *'
fts.c:176: error: invalid type argument of `unary *'
fts.c:185: error: invalid type argument of `unary *'
fts.c: In function `Fts_close':
fts.c:325: error: invalid type argument of `unary *'
fts.c: In function `Fts_read':
fts.c:499: error: invalid type argument of `unary *'
fts.c:522: error: invalid type argument of `unary *'
fts.c: In function `Fts_set':
fts.c:549: error: invalid type argument of `unary *'
fts.c: In function `Fts_children':
fts.c:565: error: invalid type argument of `unary *'
fts.c:578: error: invalid type argument of `unary *'
fts.c: In function `fts_build':
fts.c:716: warning: implicit declaration of function `dirfd'
fts.c:762: warning: implicit declaration of function `_D_EXACT_NAMLEN'
fts.c:779: error: invalid type argument of `unary *'
fts.c:803: error: invalid type argument of `unary *'
fts.c: In function `fts_stat':
fts.c:941: error: invalid type argument of `unary *'
fts.c: In function `fts_palloc':
fts.c:1106: error: invalid type argument of `unary *'
fts.c: In function `fts_safe_changedir':
fts.c:1168: error: storage size of `sb' isn't known
fts.c:1175: warning: implicit declaration of function `__fxstat64'
fts.c:1175: error: `_STAT_VER' undeclared (first use in this function)
fts.c:1175: error: (Each undeclared identifier is reported only once
fts.c:1175: error: for each function it appears in.)
fts.c:1181: error: invalid type argument of `unary *'
fts.c:1192: error: invalid type argument of `unary *'
fts.c:1168: warning: unused variable `sb'

Expected results:


Additional info:

Comment 1 Dano Carroll 2003-08-05 23:53:22 UTC
Created attachment 93418 [details]
Change hpux defines to __hpux

Comment 2 Dano Carroll 2003-08-06 00:03:35 UTC
The same problem (hpux not defined) also causes compilation of rpmrpc.c to fail:

source='rpmrpc.c' object='rpmrpc.lo' libtool=yes \
depfile='.deps/rpmrpc.Plo' tmpdepfile='.deps/rpmrpc.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I.
-I.. -I. -I.. -I../popt -I../zlib    -g -O2 -D_GNU_SOURCE -D_REENTRANT -Wall
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c
-o rpmrpc.lo `test -f 'rpmrpc.c' || echo './'`rpmrpc.c
rm -f .libs/rpmrpc.lo
/usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../popt -I../zlib -g
-O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes
-Wmissing-prototypes -Wno-char-subscripts -c rpmrpc.c -MT rpmrpc.lo -MD -MP -MF
.deps/rpmrpc.TPlo  -fPIC -DPIC -o .libs/rpmrpc.lo
rpmrpc.c: In function `vfs_parse_ls_lga':
rpmrpc.c:649: warning: comparison is always false due to limited range of data type
rpmrpc.c: In function `ftpReaddir':
rpmrpc.c:1291: error: structure has no member named `d_off'
rpmrpc.c:1293: error: structure has no member named `d_type'
rpmrpc.c: In function `Glob':
rpmrpc.c:1437: warning: assignment from incompatible pointer type
rpmrpc.c:1438: warning: assignment from incompatible pointer type
rpmrpc.c:1439: warning: assignment from incompatible pointer type


Comment 3 Dano Carroll 2003-08-06 00:05:20 UTC
Created attachment 93419 [details]
Same fix of hpux define fro rpmrpc.c

Comment 4 Jeff Johnson 2005-11-16 00:10:38 UTC
Fixed in rpm cvs, should be in rpm-4.4.3-0.50 when built. Thanks for patch and patience.