+2002-06-26 Christopher Faylor <cgf@redhat.com>
+
+ * winsup.h: Minor cleanup.
+ * path.h (path_conv::[]): New operator.
+ * syscalls.cc (_link): Use path_conv operators rather than methods,
+ where appropriate. Minor white space cleanup.
+
+2002-06-26 Christopher Faylor <cgf@redhat.com>
+
+ * include/cygwin/version.h: Bump DLL minor number.
+
+2002-06-25 Christopher Faylor <cgf@redhat.com>
+
+ * dcrt0.cc (sm): Make NO_COPY.
+
2002-06-25 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (chown): Convert uid to 32 bit.
operator const char *() {return path;}
operator DWORD &() {return fileattr;}
operator int &() {return (int) fileattr; }
+ char operator [](int i) const {return path[i];}
BOOL is_device () {return devn != FH_BAD && devn != FH_DISK;}
DWORD get_devn () {return devn == FH_BAD ? (DWORD) FH_DISK : devn;}
short get_unitn () {return devn == FH_BAD ? 0 : unit;}
{
int res = -1;
sigframe thisframe (mainthread);
- path_conv real_a (a, PC_SYM_NOFOLLOW | PC_FULL);
path_conv real_b (b, PC_SYM_NOFOLLOW | PC_FULL);
-
+ path_conv real_a (a, PC_SYM_NOFOLLOW | PC_FULL);
+
if (real_a.error)
{
set_errno (real_a.error);
goto done;
}
+
if (real_b.error)
{
set_errno (real_b.case_clash ? ECASECLASH : real_b.error);
if (real_b.exists ())
{
- syscall_printf ("file '%s' exists?", (char *)real_b);
+ syscall_printf ("file '%s' exists?", (char *) real_b);
set_errno (EEXIST);
goto done;
}
- if (real_b.get_win32 ()[strlen (real_b.get_win32 ()) - 1] == '.')
+
+ if (real_b[strlen (real_b) - 1] == '.')
{
syscall_printf ("trailing dot, bailing out");
set_errno (EINVAL);
/* Try to make hard link first on Windows NT */
if (wincap.has_hard_links ())
{
- if (CreateHardLinkA (real_b.get_win32 (), real_a.get_win32 (), NULL))
+ if (CreateHardLinkA (real_b, real_a, NULL))
{
res = 0;
goto done;
BOOL bSuccess;
hFileSource = CreateFile (
- real_a.get_win32 (),
+ real_a,
FILE_WRITE_ATTRIBUTES,
FILE_SHARE_READ | FILE_SHARE_WRITE /*| FILE_SHARE_DELETE*/,
&sec_none_nih, // sa
goto docopy;
}
- lpContext = NULL;
- cbPathLen = sys_mbstowcs (wbuf, real_b.get_win32 (), MAX_PATH) * sizeof (WCHAR);
+ cbPathLen = sys_mbstowcs (wbuf, real_b, MAX_PATH) * sizeof (WCHAR);
StreamId.dwStreamId = BACKUP_LINK;
StreamId.dwStreamAttributes = 0;
StreamId.Size.LowPart = cbPathLen;
StreamSize = sizeof (WIN32_STREAM_ID) - sizeof (WCHAR**) +
- StreamId.dwStreamNameSize;
+ StreamId.dwStreamNameSize;
+ lpContext = NULL;
/* Write the WIN32_STREAM_ID */
bSuccess = BackupWrite (
hFileSource,
}
docopy:
/* do this with a copy */
- if (CopyFileA (real_a.get_win32 (), real_b.get_win32 (), 1))
+ if (CopyFileA (real_a, real_b, 1))
res = 0;
else
__seterrno ();