]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/replog.c
Relocate regex.h test to near top and die if it fails.
[openldap] / servers / slurpd / replog.c
index b6b6004960a75e682efb791412c27df689f7cdd7..0e8f2f4c2ef5888b6937439aa083441962b181e1 100644 (file)
 #include <ac/unistd.h>
 
 #include <sys/stat.h>
+
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
+
 #include <fcntl.h>
 
 #include "slurp.h"
 #include "globals.h"
 
-/*
- * Externs
- */
-extern FILE *lock_fopen LDAP_P(( char *, char *, FILE ** ));
-
-/*
- * Forward declarations
- */
-int file_nonempty LDAP_P(( char * ));
-
-
-/*
- * Forward declarations
- */
-static int duplicate_replog( char *, char * );
-
-
 /*
  * Copy the replication log.  Returns 0 on success, 1 if a temporary
  * error occurs, and -1 if a fatal error occurs.
@@ -84,8 +71,8 @@ copy_replog(
     }
     if ( access( buf, W_OK ) < 0 ) {
        Debug( LDAP_DEBUG_ANY,
-               "Error: copy_replog (%d): Directory %s is not writable\n",
-               getpid(), buf, 0 );
+               "Error: copy_replog (%ld): Directory %s is not writable\n",
+               (long) getpid(), buf, 0 );
        return( -1 );
     }
     strcpy( buf, dst );
@@ -96,8 +83,8 @@ copy_replog(
     }
     if ( access( buf, W_OK ) < 0 ) {
        Debug( LDAP_DEBUG_ANY,
-               "Error: copy_replog (%d): Directory %s is not writable\n",
-               getpid(), buf, 0 );
+               "Error: copy_replog (%ld): Directory %s is not writable\n",
+               (long) getpid(), buf, 0 );
        return( -1 );
     }