* Makefile.in: Make malloc_wrapper -fomit-frame-pointer.
* cygwin.din: Remove extraneous mallinfo definition. * dcrt0.cc (quoted): Use strechr for efficiency. * fhandler.cc (fhandler_base::write): Correctly use get_output_handle rather than get_handle. (fhandler_base::lseek): Use method for accessing name in debug output.
This commit is contained in:
parent
e306c058c7
commit
de9e39f701
@ -1,3 +1,15 @@
|
|||||||
|
2003-09-13 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in: Make malloc_wrapper -fomit-frame-pointer.
|
||||||
|
|
||||||
|
* cygwin.din: Remove extraneous mallinfo definition.
|
||||||
|
|
||||||
|
* dcrt0.cc (quoted): Use strechr for efficiency.
|
||||||
|
|
||||||
|
* fhandler.cc (fhandler_base::write): Correctly use get_output_handle
|
||||||
|
rather than get_handle.
|
||||||
|
(fhandler_base::lseek): Use method for accessing name in debug output.
|
||||||
|
|
||||||
2003-09-13 Christopher Faylor <cgf@redhat.com>
|
2003-09-13 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler_disk_file.cc (path_conv::ndisk_links): Fix potential
|
* fhandler_disk_file.cc (path_conv::ndisk_links): Fix potential
|
||||||
|
@ -50,6 +50,7 @@ DEFS:=@DEFS@
|
|||||||
|
|
||||||
# cygheap_CFLAGS:=-fomit-frame-pointer
|
# cygheap_CFLAGS:=-fomit-frame-pointer
|
||||||
malloc_CFLAGS:=-fomit-frame-pointer
|
malloc_CFLAGS:=-fomit-frame-pointer
|
||||||
|
malloc_wrapper_CFLAGS:=-fomit-frame-pointer
|
||||||
shared_CFLAGS:=-fomit-frame-pointer
|
shared_CFLAGS:=-fomit-frame-pointer
|
||||||
cygthread_CFLAGS:=-fomit-frame-pointer
|
cygthread_CFLAGS:=-fomit-frame-pointer
|
||||||
miscfuncs_CFLAGS:=-fomit-frame-pointer
|
miscfuncs_CFLAGS:=-fomit-frame-pointer
|
||||||
|
@ -846,7 +846,6 @@ _lseek = lseek
|
|||||||
_lseek64 = lseek64
|
_lseek64 = lseek64
|
||||||
_lstat64 = lstat64
|
_lstat64 = lstat64
|
||||||
mallinfo
|
mallinfo
|
||||||
mallinfo
|
|
||||||
malloc
|
malloc
|
||||||
_malloc = malloc
|
_malloc = malloc
|
||||||
malloc_stats
|
malloc_stats
|
||||||
|
@ -231,10 +231,8 @@ quoted (char *cmd, int winshell)
|
|||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
strcpy (cmd, cmd + 1);
|
strcpy (cmd, cmd + 1);
|
||||||
if ((p = strchr (cmd, quote)) != NULL)
|
if (*(p = strechr (cmd, quote)))
|
||||||
strcpy (p, p + 1);
|
strcpy (p, p + 1);
|
||||||
else
|
|
||||||
p = strchr (cmd, '\0');
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,7 +615,7 @@ fhandler_base::write (const void *ptr, size_t len)
|
|||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (get_append_p ())
|
if (get_append_p ())
|
||||||
SetFilePointer (get_handle (), 0, 0, FILE_END);
|
SetFilePointer (get_output_handle (), 0, 0, FILE_END);
|
||||||
else if (get_did_lseek ())
|
else if (get_did_lseek ())
|
||||||
{
|
{
|
||||||
_off64_t actual_length, current_position;
|
_off64_t actual_length, current_position;
|
||||||
@ -624,10 +624,10 @@ fhandler_base::write (const void *ptr, size_t len)
|
|||||||
|
|
||||||
set_did_lseek (0); /* don't do it again */
|
set_did_lseek (0); /* don't do it again */
|
||||||
|
|
||||||
actual_length = GetFileSize (get_handle (), &size_high);
|
actual_length = GetFileSize (get_output_handle (), &size_high);
|
||||||
actual_length += ((_off64_t) size_high) << 32;
|
actual_length += ((_off64_t) size_high) << 32;
|
||||||
|
|
||||||
current_position = SetFilePointer (get_handle (), 0, &pos_high,
|
current_position = SetFilePointer (get_output_handle (), 0, &pos_high,
|
||||||
FILE_CURRENT);
|
FILE_CURRENT);
|
||||||
current_position += ((_off64_t) pos_high) << 32;
|
current_position += ((_off64_t) pos_high) << 32;
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ fhandler_base::write (const void *ptr, size_t len)
|
|||||||
is writing after a long seek beyond EOF, convert the file to
|
is writing after a long seek beyond EOF, convert the file to
|
||||||
a sparse file. */
|
a sparse file. */
|
||||||
DWORD dw;
|
DWORD dw;
|
||||||
HANDLE h = get_handle ();
|
HANDLE h = get_output_handle ();
|
||||||
BOOL r = DeviceIoControl (h, FSCTL_SET_SPARSE, NULL, 0, NULL,
|
BOOL r = DeviceIoControl (h, FSCTL_SET_SPARSE, NULL, 0, NULL,
|
||||||
0, &dw, NULL);
|
0, &dw, NULL);
|
||||||
syscall_printf ("%d = DeviceIoControl(%p, FSCTL_SET_SPARSE, "
|
syscall_printf ("%d = DeviceIoControl(%p, FSCTL_SET_SPARSE, "
|
||||||
@ -657,20 +657,20 @@ fhandler_base::write (const void *ptr, size_t len)
|
|||||||
char zeros[512];
|
char zeros[512];
|
||||||
int number_of_zeros_to_write = current_position - actual_length;
|
int number_of_zeros_to_write = current_position - actual_length;
|
||||||
memset (zeros, 0, 512);
|
memset (zeros, 0, 512);
|
||||||
SetFilePointer (get_handle (), 0, NULL, FILE_END);
|
SetFilePointer (get_output_handle (), 0, NULL, FILE_END);
|
||||||
while (number_of_zeros_to_write > 0)
|
while (number_of_zeros_to_write > 0)
|
||||||
{
|
{
|
||||||
DWORD zeros_this_time = (number_of_zeros_to_write > 512
|
DWORD zeros_this_time = (number_of_zeros_to_write > 512
|
||||||
? 512 : number_of_zeros_to_write);
|
? 512 : number_of_zeros_to_write);
|
||||||
DWORD written;
|
DWORD written;
|
||||||
if (!WriteFile (get_handle (), zeros, zeros_this_time,
|
if (!WriteFile (get_output_handle (), zeros, zeros_this_time,
|
||||||
&written, NULL))
|
&written, NULL))
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
if (get_errno () == EPIPE)
|
if (get_errno () == EPIPE)
|
||||||
raise (SIGPIPE);
|
raise (SIGPIPE);
|
||||||
/* This might fail, but it's the best we can hope for */
|
/* This might fail, but it's the best we can hope for */
|
||||||
SetFilePointer (get_handle (), current_position, NULL,
|
SetFilePointer (get_output_handle (), current_position, NULL,
|
||||||
FILE_BEGIN);
|
FILE_BEGIN);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -679,7 +679,7 @@ fhandler_base::write (const void *ptr, size_t len)
|
|||||||
{
|
{
|
||||||
set_errno (ENOSPC);
|
set_errno (ENOSPC);
|
||||||
/* This might fail, but it's the best we can hope for */
|
/* This might fail, but it's the best we can hope for */
|
||||||
SetFilePointer (get_handle (), current_position, NULL,
|
SetFilePointer (get_output_handle (), current_position, NULL,
|
||||||
FILE_BEGIN);
|
FILE_BEGIN);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -886,7 +886,7 @@ fhandler_base::lseek (_off64_t offset, int whence)
|
|||||||
set_readahead_valid (0);
|
set_readahead_valid (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_printf ("lseek (%s, %D, %d)", unix_path_name, offset, whence);
|
debug_printf ("lseek (%s, %D, %d)", get_name (), offset, whence);
|
||||||
|
|
||||||
DWORD win32_whence = whence == SEEK_SET ? FILE_BEGIN
|
DWORD win32_whence = whence == SEEK_SET ? FILE_BEGIN
|
||||||
: (whence == SEEK_CUR ? FILE_CURRENT : FILE_END);
|
: (whence == SEEK_CUR ? FILE_CURRENT : FILE_END);
|
||||||
|
@ -191,7 +191,7 @@ details. */
|
|||||||
76: mallinfo
|
76: mallinfo
|
||||||
77: thread-safe exit/at_exit
|
77: thread-safe exit/at_exit
|
||||||
78: Use stat and fstat rather than _stat, and _fstat.
|
78: Use stat and fstat rather than _stat, and _fstat.
|
||||||
Export btowc and trunc.
|
Export btowc and trunc.
|
||||||
79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
|
79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
|
||||||
aclsort32 acltomode32 acltopbits32 acltotext32 facl32
|
aclsort32 acltomode32 acltopbits32 acltotext32 facl32
|
||||||
fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
|
fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
|
||||||
@ -202,9 +202,9 @@ details. */
|
|||||||
83: Export gethostid
|
83: Export gethostid
|
||||||
84: Pty open allocates invisible console. 64 bit interface
|
84: Pty open allocates invisible console. 64 bit interface
|
||||||
85: Export new 32/64 functions from API 0.79 only with leading
|
85: Export new 32/64 functions from API 0.79 only with leading
|
||||||
underscore. No problems with backward compatibility since no
|
underscore. No problems with backward compatibility since no
|
||||||
official release has been made so far. This change removes
|
official release has been made so far. This change removes
|
||||||
exported symbols like fopen64, which might confuse configure.
|
exported symbols like fopen64, which might confuse configure.
|
||||||
86: Export ftok
|
86: Export ftok
|
||||||
87: Export vsyslog
|
87: Export vsyslog
|
||||||
88: Export _getreent
|
88: Export _getreent
|
||||||
@ -218,7 +218,7 @@ details. */
|
|||||||
93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
|
93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
|
||||||
openpty, forkpty, revoke, logwtmp, updwtmp
|
openpty, forkpty, revoke, logwtmp, updwtmp
|
||||||
94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
|
94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
|
||||||
optreset, __check_rhosts_file, __rcmd_errstr.
|
optreset, __check_rhosts_file, __rcmd_errstr.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user