bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] compiling tar cvs using mingw


From: Gerry Reno
Subject: Re: [Bug-tar] compiling tar cvs using mingw
Date: Tue, 9 Sep 2003 16:58:54 -0700 (PDT)

Hi Paul,

--- Paul Eggert <address@hidden> wrote:
> Gerry Reno <address@hidden> writes:
> 
> > extract.c:722: warning: assignment makes pointer from integer
> without a cast
> 
> This is due to a bug in the recent CVS checkins.  I think gray can
> fix
> that.  You can ignore it for now.
> 
> 
> >I ran into an error with waitpid.c saying pid_t was
> > undefined so I included types.h
> 
> Don't you mean <sys/types.h>, not <types.h>?
> 

  Yes, <sys/types.h>

> When you ran 'configure', which pid_t did it find?
> 

  Looks like maybe #define pid_t int

$grep pid_t config*
config.h:/* #undef pid_t */
config.hin:#undef pid_t
config.log:configure:5605: checking for pid_t
config.log:ac_cv_type_pid_t=yes
configure:echo "$as_me:$LINENO: checking for pid_t" >&5
configure:echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
configure:if test "${ac_cv_type_pid_t+set}" = set; then
configure:if ((pid_t *) 0)
configure:if (sizeof (pid_t))
configure:  ac_cv_type_pid_t=yes
configure:ac_cv_type_pid_t=no
configure:echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
configure:echo "${ECHO_T}$ac_cv_type_pid_t" >&6
configure:if test $ac_cv_type_pid_t = yes; then
configure:#define pid_t int


> 
> >  create.c couldn't find pwd.h and
> > grp.h so I copied those from /usr/include
> 
> Isn't /usr/include part of the include path already?  

  I thought that it would be but if you look at the compile lines they
just have:  -I. -I. -I.. -I../lib -I../lib
so I edited the Makefile and added -I/usr/include and
-I/usr/include/sys
but I think I should have probably added the mingw include dirs ahead
of them - what do you think?


>If not,
> perhaps you should just configure with CFLAGS=-I/usr/include.
> 
> Also, create.c includes pwd.h and grp.h only if MSDOS is 0.
> Suppose you compile with -DMSDOS=1; does that fix things?
> 

  Alright, this works for create.c but it fails for xheader.c below:

d:\mingw\bin\mingw32-make.exe[2]: Entering directory
`D:/cygwin/home/greno/dev/g
nu/tar/src'
if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-I/usr/include
 -I/usr/include/sys    -g -O2 -DMSDOS=1 -MT create.o -MD -MP -MF
".deps/create.T
po" \
  -c -o create.o `test -f 'create.c' || echo './'`create.c; \
then mv -f ".deps/create.Tpo" ".deps/create.Po"; \
else rm -f ".deps/create.Tpo"; exit 1; \
fi
create.c: In function `mode_to_chars':
create.c:266: warning: comparison is always false due to limited range
of data t
ype
create.c: In function `start_header':
create.c:537: warning: comparison is always false due to limited range
of data t
ype
create.c:542: warning: comparison is always false due to limited range
of data t
ype
----------------------
if gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib
-I/usr/include
 -I/usr/include/sys    -g -O2 -DMSDOS=1 -MT xheader.o -MD -MP -MF
".deps/xheader
.Tpo" \
  -c -o xheader.o `test -f 'xheader.c' || echo './'`xheader.c; \
then mv -f ".deps/xheader.Tpo" ".deps/xheader.Po"; \
else rm -f ".deps/xheader.Tpo"; exit 1; \
fi
xheader.c:21:17: grp.h: No such file or directory
xheader.c:23:17: pwd.h: No such file or directory
d:\mingw\bin\mingw32-make.exe[2]: *** [xheader.o] Error 1


> 
> > extract.c:385: too many arguments to function `mkdir'
> > ...
> > It looks like the mingw io.h would define it with one arg.
> 
> Is this because there is no notion of permissions in DOS?
> 
> src/system.h includes io.h only if !defined _POSIX_VERSION && MSDOS,
> so MSDOS must be nonzero.  But in that case why did create.c
> include pwd.h and grp.h?
> 
> Does it work to include the following line after '# include <io.h>'
> in src/system.h?
> 
> #define mkdir(file, mode) (mkdir) (file)

  I tried your suggestion but no luck.  Same error as before.

thanks for the assistance,
Gerry Reno



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]