Boost logo

Boost-Build :

From: Daniel Einspanjer (deinspanjer_at_[hidden])
Date: 2006-01-31 10:43:53


On 2006-01-26 12:07:31 Rene Rivera said:
> There's code in the var_expand_unit_test that tries to verify the
> functionality of expanding paths. In the case of Cygwin it wants to
> check that something like "/cygdrive/c/foo/bar" is translated to
> something like "c:\foo\bar". The problem comes in that the "/cygdrive"
> part is a user configurable path on Cygwin. I wrote code that tries to
> decipher what that 'cygdrive' is, as there doesn't seem to be any Cygwin
> call to get that value. Unfortunately, or fortunately from my POV, I
> don't have Cygwin to test with. So any help in getting that code working
> is appreciated ;-)

Please pardon me if this post is not helpful, but I as I was digging through
the archives here trying to get up to speed with Boost.Build V2, I saw your
comment about not knowing how to detect cygdrive. I just happened to be
looking at the code for the cygwin version of mount and I was wondering if
maybe this snippit might be useful:

>From /usr/src/cygwin-1.5.19-4/winsup/utils/mount.cc

/* show_cygdrive_info: Show the user and/or cygdrive info, i.e., prefix and
   flags.*/
static void
show_cygdrive_info ()
{
  /* Get the cygdrive info */
  char user[MAX_PATH];
  char system[MAX_PATH];
  char user_flags[MAX_PATH];
  char system_flags[MAX_PATH];
  cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags,
           system_flags);

  /* Display the user and system cygdrive path prefix, if necessary
     (ie, not empty) */
  const char *format = "%-18s %-11s %s\n";
  printf (format, "Prefix", "Type", "Flags");
  if (strlen (user) > 0)
    printf (format, user, "user", user_flags);
  if (strlen (system) > 0)
    printf (format, system, "system", system_flags);

  exit (0);
}



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk