[Python-checkins] python/dist/src/Python exceptions.c,1.41,1.42 import.c,2.211,2.212

loewis@users.sourceforge.net loewis@users.sourceforge.net
Fri, 06 Dec 2002 04:49:28 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv11610/Python

Modified Files:
	exceptions.c import.c 
Log Message:
Patch #614055: Support OpenVMS.


Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** exceptions.c	21 Nov 2002 20:08:31 -0000	1.41
--- exceptions.c	6 Dec 2002 12:48:53 -0000	1.42
***************
*** 68,71 ****
--- 68,72 ----
   |    |         |\n\
   |    |         +-- WindowsError\n\
+  |    |         +-- VMSError\n\
   |    |\n\
   |    +-- EOFError\n\
***************
*** 644,647 ****
--- 645,653 ----
  #endif /* MS_WINDOWS */
  
+ #ifdef __VMS
+ static char
+ VMSError__doc__[] = "OpenVMS OS system call failed.";
+ #endif
+ 
  PyDoc_STRVAR(EOFError__doc__, "Read beyond end of file.");
  
***************
*** 1600,1603 ****
--- 1606,1612 ----
  PyObject *PyExc_WindowsError;
  #endif
+ #ifdef __VMS
+ PyObject *PyExc_VMSError;
+ #endif
  
  /* Pre-computed MemoryError instance.  Best to create this as early as
***************
*** 1651,1654 ****
--- 1660,1667 ----
    WindowsError__doc__},
  #endif /* MS_WINDOWS */
+ #ifdef __VMS
+  {"VMSError", &PyExc_VMSError, &PyExc_OSError,
+   VMSError__doc__},
+ #endif
   {"EOFError",     &PyExc_EOFError,     0, EOFError__doc__},
   {"RuntimeError", &PyExc_RuntimeError, 0, RuntimeError__doc__},

Index: import.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.211
retrieving revision 2.212
diff -C2 -d -r2.211 -r2.212
*** import.c	29 Nov 2002 20:47:40 -0000	2.211
--- import.c	6 Dec 2002 12:48:53 -0000	2.212
***************
*** 694,699 ****
  				|O_BINARY   /* necessary for Windows */
  #endif
! 
! 			, 0666);
  	if (fd < 0)
  		return NULL;
--- 694,702 ----
  				|O_BINARY   /* necessary for Windows */
  #endif
! #ifdef __VMS
!                         , 0666, "ctxt=bin", "shr=nil");
! #else
!                         , 0666);
! #endif
  	if (fd < 0)
  		return NULL;