* fhandler.cc (off_current): Define local in fhandler_base::raw_write.
Drop erroneous NO_COPY, add _RDATA to make R/O. (off_append): Ditto. * globals.cc (_RDATA): Move definition from here... * winsup.h: ...to here.
This commit is contained in:
parent
7c01efe088
commit
516fbf67a0
@ -1,3 +1,11 @@
|
|||||||
|
2011-11-03 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler.cc (off_current): Define local in fhandler_base::raw_write.
|
||||||
|
Drop erroneous NO_COPY, add _RDATA to make R/O.
|
||||||
|
(off_append): Ditto.
|
||||||
|
* globals.cc (_RDATA): Move definition from here...
|
||||||
|
* winsup.h: ...to here.
|
||||||
|
|
||||||
2011-10-30 Christopher Faylor <me.cygwin2011@cgf.cx>
|
2011-10-30 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||||
|
|
||||||
* fhandler.h (fhandler_pipe::create_selectable): Remove optional
|
* fhandler.h (fhandler_pipe::create_selectable): Remove optional
|
||||||
|
@ -275,14 +275,15 @@ retry:
|
|||||||
|
|
||||||
/* Cover function to WriteFile to provide Posix interface and semantics
|
/* Cover function to WriteFile to provide Posix interface and semantics
|
||||||
(as much as possible). */
|
(as much as possible). */
|
||||||
static NO_COPY LARGE_INTEGER off_current = { QuadPart:FILE_USE_FILE_POINTER_POSITION };
|
|
||||||
static NO_COPY LARGE_INTEGER off_append = { QuadPart:FILE_WRITE_TO_END_OF_FILE };
|
|
||||||
|
|
||||||
ssize_t __stdcall
|
ssize_t __stdcall
|
||||||
fhandler_base::raw_write (const void *ptr, size_t len)
|
fhandler_base::raw_write (const void *ptr, size_t len)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
IO_STATUS_BLOCK io;
|
IO_STATUS_BLOCK io;
|
||||||
|
static _RDATA LARGE_INTEGER off_current =
|
||||||
|
{ QuadPart:FILE_USE_FILE_POINTER_POSITION };
|
||||||
|
static _RDATA LARGE_INTEGER off_append =
|
||||||
|
{ QuadPart:FILE_WRITE_TO_END_OF_FILE };
|
||||||
|
|
||||||
status = NtWriteFile (get_output_handle (), NULL, NULL, NULL, &io,
|
status = NtWriteFile (get_output_handle (), NULL, NULL, NULL, &io,
|
||||||
(PVOID) ptr, len,
|
(PVOID) ptr, len,
|
||||||
|
@ -70,9 +70,6 @@ bool NO_COPY _cygwin_testing;
|
|||||||
|
|
||||||
char NO_COPY almost_null[1];
|
char NO_COPY almost_null[1];
|
||||||
|
|
||||||
/* Define globally used, but readonly variables using the _RDATA attribute. */
|
|
||||||
#define _RDATA __attribute__ ((section(".rdata")))
|
|
||||||
|
|
||||||
/* Heavily-used const UNICODE_STRINGs are defined here once. The idea is a
|
/* Heavily-used const UNICODE_STRINGs are defined here once. The idea is a
|
||||||
speed improvement by not having to initialize a UNICODE_STRING every time
|
speed improvement by not having to initialize a UNICODE_STRING every time
|
||||||
we make a string comparison. The strings are not defined as const,
|
we make a string comparison. The strings are not defined as const,
|
||||||
@ -123,8 +120,6 @@ cygwin_props_t _RDATA cygwin_props =
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef _RDATA
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
/* This is an exported copy of environ which can be used by DLLs
|
/* This is an exported copy of environ which can be used by DLLs
|
||||||
|
@ -23,6 +23,7 @@ details. */
|
|||||||
|
|
||||||
#define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy")))
|
#define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy")))
|
||||||
#define NO_COPY_INIT __attribute__((section(".data_cygwin_nocopy")))
|
#define NO_COPY_INIT __attribute__((section(".data_cygwin_nocopy")))
|
||||||
|
#define _RDATA __attribute__ ((section(".rdata")))
|
||||||
|
|
||||||
#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
|
#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user