Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Dario Alcocer 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 AT cygwin DOT com Cc: John David Galt Subject: Re: Questions related to enhancing "tar" In-Reply-To: <3B3ADCB3.F50A00E3@diogenes.sacramento.ca.us> References: <993680728 DOT 27063 DOT ezmlm AT sources DOT redhat DOT com> <3B3ADCB3 DOT F50A00E3 AT diogenes DOT sacramento DOT ca DOT us> X-Mailer: VM 6.76 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid >>>>> "John" == John David Galt 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 AT helixdigital DOT 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/