diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 13 | ||||
-rw-r--r-- | winsup/cygwin/Makefile.in | 2 | ||||
-rw-r--r-- | winsup/cygwin/cygwin.din | 47 | ||||
-rw-r--r-- | winsup/cygwin/cygxdr.cc | 24 | ||||
-rw-r--r-- | winsup/cygwin/cygxdr.h | 25 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/posix.sgml | 47 |
8 files changed, 161 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c3b36447e..175a8c3ac 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,16 @@ +2010-03-03 Charles Wilson <cygwin@cwilson.fastmail.fm> + + Add XDR support. + * cygwin.din: Export xdr functions. + * include/cygwin/version.h: Bump version. + * cygxdr.cc: New. + * cygxdr.h: New. + * dcrt0.cc (dll_crt0_1): Print the (rare) xdr-related + error messages to stderr. + * Makefile.in: Add cygxdr. + * posix.sgml: Add new XDR functions to list of implemented Solaris + functions. + 2010-03-01 Christopher Faylor <me+cygwin@cgf.cx> * cygtls.h: Replace /*gentls_offsets*/ at end. diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 741dd66ff..0499a5cc7 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -136,7 +136,7 @@ MT_SAFE_OBJECTS:= # Please maintain this list in sorted order, with maximum files per 86 col line # DLL_OFILES:=assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o \ - cygtls.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o \ + cygtls.o cygxdr.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o \ dtable.o environ.o errno.o exceptions.o exec.o external.o fcntl.o \ fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_disk_file.o \ fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o \ diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index 46f03582c..e9850976b 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -1815,6 +1815,53 @@ _write = write SIGFE writev SIGFE _writev = writev SIGFE wscanf SIGFE +xdr_array SIGFE +xdr_bool SIGFE +xdr_bytes SIGFE +xdr_char SIGFE +xdr_double SIGFE +xdr_enum SIGFE +xdr_float SIGFE +xdr_free SIGFE +xdr_hyper SIGFE +xdr_int SIGFE +xdr_int16_t SIGFE +xdr_int32_t SIGFE +xdr_int64_t SIGFE +xdr_int8_t SIGFE +xdr_long SIGFE +xdr_longlong_t SIGFE +xdr_netobj SIGFE +xdr_opaque SIGFE +xdr_pointer SIGFE +xdr_reference SIGFE +xdr_short SIGFE +xdr_sizeof SIGFE +xdr_string SIGFE +xdr_u_char SIGFE +xdr_u_hyper SIGFE +xdr_u_int SIGFE +xdr_u_int16_t SIGFE +xdr_u_int32_t SIGFE +xdr_u_int64_t SIGFE +xdr_u_int8_t SIGFE +xdr_u_long SIGFE +xdr_u_longlong_t SIGFE +xdr_u_short SIGFE +xdr_uint16_t SIGFE +xdr_uint32_t SIGFE +xdr_uint64_t SIGFE +xdr_uint8_t SIGFE +xdr_union SIGFE +xdr_vector SIGFE +xdr_void SIGFE +xdr_wrapstring SIGFE +xdrmem_create SIGFE +xdrrec_create SIGFE +xdrrec_endofrecord SIGFE +xdrrec_eof SIGFE +xdrrec_skiprecord SIGFE +xdrstdio_create SIGFE y0 NOSIGFE y0f NOSIGFE y1 NOSIGFE diff --git a/winsup/cygwin/cygxdr.cc b/winsup/cygwin/cygxdr.cc new file mode 100644 index 000000000..5b0e6ba3a --- /dev/null +++ b/winsup/cygwin/cygxdr.cc @@ -0,0 +1,24 @@ +/* cygxdr.cc: + + Copyright 2010 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#include "winsup.h" +#include <stdarg.h> +#include <stdio.h> +#include "cygxdr.h" + +extern "C" void +cygxdr_vwarnx (const char * fmt, va_list ap) +{ + /* Imitate glibc behavior for xdr: messages are printed to stderr */ + (void) fputs ("xdr-routines: ", stderr); + (void) vfprintf (stderr, fmt, ap); + (void) fputs ("\n", stderr); +} + diff --git a/winsup/cygwin/cygxdr.h b/winsup/cygwin/cygxdr.h new file mode 100644 index 000000000..e8b1319ad --- /dev/null +++ b/winsup/cygwin/cygxdr.h @@ -0,0 +1,25 @@ +/* cygxdr.h: + + Copyright 2010 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ +#ifndef _CYGXDR_H +#define _CYGXDR_H + +extern "C" +{ + +typedef void (*xdr_vprintf_t)(const char *, va_list); + +xdr_vprintf_t xdr_set_vprintf (xdr_vprintf_t); + +void cygxdr_vwarnx (const char *, va_list); + +} + +#endif + diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index b32a50e8d..f85f297bf 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -35,6 +35,7 @@ details. */ #include "heap.h" #include "tls_pbuf.h" #include "exception.h" +#include "cygxdr.h" #define MAX_AT_FILE_LEVEL 10 @@ -911,6 +912,7 @@ dll_crt0_1 (void *) set_console_title (cp); } + (void) xdr_set_vprintf (&cygxdr_vwarnx); cygwin_finished_initializing = true; /* Call init of loaded dlls. */ dlls.init (); diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 7aeee3147..b10c7dc25 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -377,12 +377,13 @@ details. */ 221: Export strfmon. 222: CW_INT_SETLOCALE added. 223: SIGPWR added. + 224: Export xdr* functions. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 223 +#define CYGWIN_VERSION_API_MINOR 224 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml index c7e16ef12..e55bea602 100644 --- a/winsup/cygwin/posix.sgml +++ b/winsup/cygwin/posix.sgml @@ -1078,6 +1078,53 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para> getmntent memalign setmntent + xdr_array + xdr_bool + xdr_bytes + xdr_char + xdr_double + xdr_enum + xdr_float + xdr_free + xdr_hyper + xdr_int + xdr_int16_t + xdr_int32_t + xdr_int64_t + xdr_int8_t + xdr_long + xdr_longlong_t + xdr_netobj + xdr_opaque + xdr_pointer + xdr_reference + xdr_short + xdr_sizeof + xdr_string + xdr_u_char + xdr_u_hyper + xdr_u_int + xdr_u_int16_t + xdr_u_int32_t + xdr_u_int64_t + xdr_u_int8_t + xdr_u_long + xdr_u_longlong_t + xdr_u_short + xdr_uint16_t + xdr_uint32_t + xdr_uint64_t + xdr_uint8_t + xdr_union + xdr_vector + xdr_void + xdr_wrapstring + xdrmem_create + xdrrec_create + xdrrec_endofrecord + xdrrec_eof + xdrrec_skiprecord + xdrstdio_create </screen> </sect1> |