[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNULib save-cwd.c on Windows & Visual Studio 6.0

From: Conrad T. Pino
Subject: GNULib save-cwd.c on Windows & Visual Studio 6.0
Date: Mon, 7 Mar 2005 22:24:06 -0800

Hash: SHA1

Hi Jim,

The CVS project compiles the Windows CVS binary with Microsoft Visual
Studio 6.0 which doesn't have a "fchdir" implementation which is used
in "save-cwd.c" module.  The comments say:

   Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin,
   SCO Xenix.  Also, SunOS 4 and Irix 5.3 provide the function, yet it
   doesn't work for partitions on which auditing is enabled.  If
   you're still using an obsolete system with these problems, please
   send email to the maintainer of this code.

Function "fchdir" is also used in "chdir-long.c" and "openat.c" modules
which may not be used in Windows build.

What would you suggest for this issue?

Best regards,

Conrad T. Pino

The "grep fchdir ..." and build error outputs follow:

File lib\chdir-long.c:
56      cdb_fchdir (struct cd_buf const *cdb)
58        return fchdir (cdb->fd);
200         if (cdb_fchdir (&cdb) != 0)

File lib\openat.c:
39         Simulate it by doing save_cwd/fchdir/open/restore_cwd.
72        if (fchdir (fd) != 0)
95         Simulate it by doing save_cwd/fchdir/opendir(".")/restore_cwd.
114       if (fchdir (fd) != 0)
137        Simulate it by doing save_cwd/fchdir/(stat|lstat)/restore_cwd.
158       if (fchdir (fd) != 0)

File lib\save-cwd.c:
58         So, we prefer to use the open/fchdir approach, but fall back on
61         Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin,
87         Upon failure, return -1 (errno is set by chdir or fchdir).
94          return fchdir (cwd->desc);

- --------------------Configuration: cvsnt - Win32 Debug--------------------
libdiff.lib(save-cwd.obj) : error LNK2001: unresolved external symbol _fchdir
.\WinDebug\cvs.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

cvs.exe - 2 error(s), 0 warning(s)

Version: PGP 7.0.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]