OSDN Git Service

Add XDR support.
authorcorinna <corinna>
Wed, 3 Mar 2010 15:05:17 +0000 (15:05 +0000)
committercorinna <corinna>
Wed, 3 Mar 2010 15:05:17 +0000 (15:05 +0000)
* 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.

winsup/cygwin/ChangeLog
winsup/cygwin/Makefile.in
winsup/cygwin/cygwin.din
winsup/cygwin/cygxdr.cc [new file with mode: 0644]
winsup/cygwin/cygxdr.h [new file with mode: 0644]
winsup/cygwin/dcrt0.cc
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/posix.sgml

index c3b3644..175a8c3 100644 (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.
index 7273921..0499a5c 100644 (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 \
@@ -329,7 +329,6 @@ install-headers:
              $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/$$sub/`basename $$i` ; \
            done ; \
        done ; \
-       $(INSTALL_DATA) regex/regex.h $(DESTDIR)$(tooldir)/include/regex.h
 
 install-man:
        @$(MKDIRP) $(DESTDIR)$(mandir)/man2 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7
@@ -364,7 +363,6 @@ uninstall-headers:
              rm -f $(tooldir)/$$sub/`basename $$i` ; \
            done ; \
        done ; \
-       rm -f $(tooldir)/include/regex.h
 
 uninstall-man:
        cd $(srcdir); \
index 46f0358..e985097 100644 (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
diff --git a/winsup/cygwin/cygxdr.cc b/winsup/cygwin/cygxdr.cc
new file mode 100644 (file)
index 0000000..5b0e6ba
--- /dev/null
@@ -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 (file)
index 0000000..e8b1319
--- /dev/null
@@ -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
+
index b32a50e..f85f297 100644 (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 ();
index 7aeee31..b10c7dc 100644 (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
index c7e16ef..e55bea6 100644 (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>