]> granicus.if.org Git - apache/commitdiff
sync with trunk to silent compiler warnings.
authorGuenter Knauf <fuankg@apache.org>
Wed, 19 Jun 2013 11:51:57 +0000 (11:51 +0000)
committerGuenter Knauf <fuankg@apache.org>
Wed, 19 Jun 2013 11:51:57 +0000 (11:51 +0000)
Backport of r1481677, r1494317, r1488496.
Reviewed by: fuankg, gsmith, minfrin

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1494568 13f79535-47bb-0310-9956-ffa450edef68

support/passwd_common.c
support/passwd_common.h

index 395dc934505bb0cd50899737ec3de8abb438afc4..343fa7906431821913e34b20f3ce70bca42e3926 100644 (file)
 
 #include "apr_md5.h"
 #include "apr_sha1.h"
-#include <time.h>
 
+#if APR_HAVE_TIME_H
+#include <time.h>
+#endif
 #if APR_HAVE_CRYPT_H
 #include <crypt.h>
 #endif
 #if APR_HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#if APR_HAVE_IO_H
+#include <io.h>
+#endif
 
-#ifdef WIN32
-#include <conio.h>
-#define unlink _unlink
+#ifdef _MSC_VER
+#define write _write
 #endif
 
 apr_file_t *errfile;
index 00680624cea257ff7848b573d83996564b635fa3..01d565202429f35f4de64cedf05ae9b87c86f23a 100644 (file)
@@ -14,6 +14,9 @@
  * limitations under the License.
  */
 
+#ifndef _PASSWD_COMMON_H
+#define _PASSWD_COMMON_H
+
 #include "apr.h"
 #include "apr_lib.h"
 #include "apr_strings.h"
@@ -115,3 +118,6 @@ int get_password(struct passwd_ctx *ctx);
  * Make a password record from the given information.
  */
 int mkhash(struct passwd_ctx *ctx);
+
+#endif /* _PASSWD_COMMON_H */
+