🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Frank Warmerdam Mon, 14 Sep 1992 17:01
tar-1.11
#847
Author: Frank Warmerdam
Date: Mon, 14 Sep 1992 17:01
56 lines
3220 bytes
The follow relates a few problems I had building GNU tar under
under IRIX 4.0.1 on a Personal Iris:

While attempting to compile using the default cc with ANSI headers
but to __STDC__ defined or strict type checking I get the following:

cc -c -g  -DMAJOR_IN_SYSMACROS=1 -DDIRENT=1 -DHAVE_SYS_MTIO_H=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STRSTR=1 -DHAVE_MKDIR=1 -DHAVE_MKNOD=1 -DHAVE_RENAME=1 -DHAVE_FTRUNCATE=1 -DHAVE_VPRINTF=1 -DHAVE_ALLOCA_H=1 -DDEF_AR_FILE=\"/dev/tape\" -DDEFBLOCKING=20 -I. -I. tar.c
accom: Error: /usr/include/stdlib.h, line 102: Qualifier mismatch in prototype,   pointer toconst  char  versus   pointer to char
       extern int       system(  char *);
       ---------------------------------^

I discovered that this is because stdio.h defines system() to take a
'const char *' as an argument, and later port.h #define's const out of
existence.  After this occurs stdlib.h defines system() again, but
this time the 'const' key word is deleted.  These problems would have
been avoided if __STDC__ where defined so I reran configure with 
CC="cc -ansi", the stringent ANSI version of the IRIX C compiler.
Nevertheless this problem might be avoidable right from the start.

Following this I ran into an error related to passing restore_times
as the second argument to utime().  It seems that on the SGI utime()
takes a second argument of type 'struct utimbuf *', which of course
only contains two time_t elements.  restore_times is just an array
of two time_t values, but the type checking fails generating a fatal
compiler error.  I am not if struct utimbuf exists on all machines, 
but it does exist on most of the machines I checked.   I leave the
final solution of this problem to you.


Tiring somewhat of these prototyping problems, I reconfigured using 
CC="cc -cckr" (K & R version).  The build was then uneventful with
the exception of #ifdef's spaced away from the beginning of the line 
in expand.c, and buffer.c.

ie.
    #ifdef __MSDOS__

In my experience a wide range of systems can grok the following:

#    ifdef __MSDOS__

so you might consider using that style of preprocessor identation
if you really want to indent preprocessor directives.

One thing that was rather perturbing was when the 'make install'
procedure replace my system /etc/rmt without much warning.  While
I realize in retrospect that this was mentioned in the README, it
still caught me by surprise.  Perhaps this ought to be rethought
a little.

I am still looking into how well GNU tar actually runs.  I will 
update you on this.  Keep up the good work!

-------------------------------------------------------------------------------
Frank Warmerdam | Who can give them back their lives | warmerda@pci.on.ca    
Software Artist | and all those wasted years? - Rush |
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads