Przeglądaj źródła

* errno.c: Mono_Posix_Syscall_SetLastError should be in Stdlib, not Syscall,
since it's part of ANSI C (and errno will be used from StdioFileStream).
Add Mono_Posix_Stdlib_SetLastError. Don't remove the Syscall version, as
we don't want to break Mono 1.1.4/svn users the day after release. :-)

svn path=/trunk/mono/; revision=40086

Jonathan Pryor 21 lat temu
rodzic
commit
edb6779cf2
2 zmienionych plików z 14 dodań i 0 usunięć
  1. 7 0
      support/ChangeLog
  2. 7 0
      support/errno.c

+ 7 - 0
support/ChangeLog

@@ -1,3 +1,10 @@
+2005-02-03  Jonathan Pryor  <[email protected]>
+
+	* errno.c: Mono_Posix_Syscall_SetLastError should be in Stdlib, not Syscall, 
+	  since it's part of ANSI C (and errno will be used from StdioFileStream).  
+	  Add Mono_Posix_Stdlib_SetLastError.  Don't remove the Syscall version, as 
+	  we don't want to break Mono 1.1.4/svn users the day after release. :-)
+
 2005-01-25  Jonathan Pryor  <[email protected]>
 
 	* macros.c: Use gint64, not long, to match C# declaration.  Fixes 71152.

+ 7 - 0
support/errno.c

@@ -14,12 +14,19 @@
 
 G_BEGIN_DECLS
 
+/* DEPRECATED: Use the Stdlib version instead */
 void
 Mono_Posix_Syscall_SetLastError (int error_number)
 {
 	errno = error_number;
 }
 
+void
+Mono_Posix_Stdlib_SetLastError (int error_number)
+{
+	errno = error_number;
+}
+
 #ifdef HAVE_STRERROR_R
 gint32
 Mono_Posix_Syscall_strerror_r (int errnum, char *buf, mph_size_t n)