Interoperatibility problem in tar 1.13.19

POSTLBAUER, JUAN (HP-Spain, ex1) juan_postlbauer@hp.com
Wed Jun 13 07:45:00 GMT 2001


Two different problems:

1) 

Trying to compile the cygwin source under linux (SuSE 7.1, kernel 2.4)
complains about O_TEXT not defined.
True: "grep -r -e O_BINARY -e O_TEXT /usr/include" yields nothing.

I guess the patch would be in system.h, where you already do something
similar for O_BINARY
#ifndef O_BINARY
#define O_BINARY 0
#endif
then just do the same for O_TEXT.

That's exactly what I did in order to compile your sources on linux (see why
I needed that in problem 2 below) and it works fine.

This is not critical, as the source is intended for cygwin. But doing so
might allow for using the same sources for every plattform.

2) The big one

Also, as the numeric form of the open flags for the rmt protocol is retained
"for compatibility", it would be better to suppress from that number all
options causing compatibility problems.

Real case:
Tar is run in cygwin 1.1.8
rmt runs under linux (suse 7.1), and it's not aware of symbolic form. In
this case I also owned the linux box and was able to upgrade rmt to a newer
version. But in a general case you wouldn't be able to do it because it
wouldn't be your system.

"rmt tvf host:/dev/st" fails, because tar uses O_BINARY, which under cygwin
is 0x10000, wich under linux is O_DIRECTORY. So you get error 20: no such
directory.

My proposed fix: send the full set of "open flags" in text form, but include
only "full cross plattform" options in the numeric form.
This way if the target is a new implementation it will correctly parse the
text form and discard the numeric form, whereas if it is and old
implementation it won't get confused misunderstunding the numeric option.

	Best regards
Juan Postlbauer
   BRS Technical Consultant
   Hewlett-Packard Española
 

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list