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.
This commit is contained in:
Corinna Vinschen 2010-03-03 15:05:19 +00:00
parent 6fc25b2d1e
commit 53c24915c4
8 changed files with 161 additions and 2 deletions

View File

@ -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.

View File

@ -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 \

View File

@ -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

24
winsup/cygwin/cygxdr.cc Normal file
View File

@ -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);
}

25
winsup/cygwin/cygxdr.h Normal file
View File

@ -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

View File

@ -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 ();

View File

@ -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

View File

@ -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>