Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: Dario Alcocer <alcocer@helixdigital.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15163.15416.506476.498402@coyote.priv.helixdigital.com>
Date: Thu, 28 Jun 2001 07:16:24 -0700
To: cygwin@cygwin.com
Cc: John David Galt <jdg@diogenes.sacramento.ca.us>
Subject: Re: Questions related to enhancing "tar"
In-Reply-To: <3B3ADCB3.F50A00E3@diogenes.sacramento.ca.us>
References: <993680728.27063.ezmlm@sources.redhat.com>
	<3B3ADCB3.F50A00E3@diogenes.sacramento.ca.us>
X-Mailer: VM 6.76 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid

>>>>> "John" == John David Galt <jdg@diogenes.sacramento.ca.us> writes:

    John> First off, correct me if I'm wrong, but I assume that
    John> Cygwin's version of G++ uses the same underlying INT 21 BIOS
    John> calls for file access as Windows does.

No.  All Win32 programs, including the Cygwin programs, use the file
access routines of the Win32 API.  They don't use DOS anymore[1], which
used to be the INT 21h interface you refer to.

    John> The BIOS turns on the Archive attribute whenever a file is
              ^^^^
Actually, DOS is the one that used to perform this function.

    John> a) How do I read and write the Archive attribute bit from a
    John> program compiled in G++ under Cygwin?  Is it accessible
    John> using ioctl(), and what are the parameters?  (man pages that
    John> specific don't appear to exist for Cygwin.)

Best place to look is in the source to the Cygwin DLL; refer to the
following "mirrors" list:

    http://www.cygwin.com/mirrors.html

Grab the file cygwin-1.3.2-1-src.tar.gz, located in the latest/cygwin
directory.  Check if the Win32 file attributes function (sorry, I
don't recall the name of the function of the top of my head) is being
called anywhere.

    John> b) Does Cygwin have its own separate version of "tar"?  If
    John> not, would they be willing to host one, or a link to mine?

Well, you could modify the Cygwin tar, I guess.  However, I think an
easier thing to do is to write a shell script that calls tar to backup
your files, and then for each file, calls the 'attrib' program to
reset the archive bit.  Implementation of such a script is pretty
straightforward, and thus, is left as an exercise to the reader... :-)

[1] Well, not directly, in the case of Win9x and WinME.  For NT and
W2K, they don't use DOS at all.

-- 
Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
alcocer@helixdigital.com -- http://www.helixdigital.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

