Parcourir la source

* signal.c, stdio.c: Remove "function declaration isn't a prototype" warnings. * unistd.c: Check for presence of gethostname and sethostname.

svn path=/trunk/mono/; revision=38279
Jonathan Pryor il y a 21 ans
Parent
commit
6ad9da71f3
4 fichiers modifiés avec 14 ajouts et 4 suppressions
  1. 5 0
      support/ChangeLog
  2. 3 3
      support/signal.c
  3. 2 1
      support/stdio.c
  4. 4 0
      support/unistd.c

+ 5 - 0
support/ChangeLog

@@ -1,3 +1,8 @@
+2005-01-03  Jonathan Pryor  <[email protected]>
+
+	* signal.c, stdio.c: Remove "function declaration isn't a prototype" warnings.
+	* unistd.c: Check for presence of gethostname and sethostname.
+
 2005-01-03  Jonathan Pryor  <[email protected]>
 
 	* mph.h, x-struct-str.c: Add "const" to parameters to remove 

+ 3 - 3
support/signal.c

@@ -11,19 +11,19 @@ G_BEGIN_DECLS
 typedef void (*mph_sighandler_t)(int);
 
 mph_sighandler_t
-Mono_Posix_Stdlib_SIG_DFL ()
+Mono_Posix_Stdlib_SIG_DFL (void)
 {
 	return SIG_DFL;
 }
 
 mph_sighandler_t
-Mono_Posix_Stdlib_SIG_ERR ()
+Mono_Posix_Stdlib_SIG_ERR (void)
 {
 	return SIG_ERR;
 }
 
 mph_sighandler_t
-Mono_Posix_Stdlib_SIG_IGN ()
+Mono_Posix_Stdlib_SIG_IGN (void)
 {
 	return SIG_IGN;
 }

+ 2 - 1
support/stdio.c

@@ -8,6 +8,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "mph.h"
 
@@ -137,7 +138,7 @@ Mono_Posix_Stdlib_ftell (FILE* stream)
 }
 
 fpos_t*
-Mono_Posix_Stdlib_CreateFilePosition ()
+Mono_Posix_Stdlib_CreateFilePosition (void)
 {
 	fpos_t* pos = malloc (sizeof(fpos_t));
 	return pos;

+ 4 - 0
support/unistd.c

@@ -187,19 +187,23 @@ Mono_Posix_Syscall_sethostid (gint64 hostid)
 }
 #endif /* def HAVE_SETHOSTID */
 
+#ifdef HAVE_GETDOMAINNAME
 gint32
 Mono_Posix_Syscall_getdomainname (char *name, mph_size_t len)
 {
 	mph_return_if_size_t_overflow (len);
 	return getdomainname (name, (size_t) len);
 }
+#endif /* def HAVE_GETDOMAINNAME */
 
+#ifdef HAVE_SETDOMAINNAME
 gint32
 Mono_Posix_Syscall_setdomainname (const char *name, mph_size_t len)
 {
 	mph_return_if_size_t_overflow (len);
 	return setdomainname (name, (size_t) len);
 }
+#endif /* def HAVE_SETDOMAINNAME */
 
 gint32
 Mono_Posix_Syscall_truncate (const char *path, mph_off_t length)