Skip to content

Commit

Permalink
Merge r1917642 from trunk:
Browse files Browse the repository at this point in the history
* build/apr_threads.m4, build/apr_common.m4, configure.in: Use full
  prototype for main() throughout, avoiding warnings when building
  with gcc -Wstrict-prototypes.




git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1920069 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Aug 20, 2024
1 parent dd62842 commit 6d8fa73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build/apr_common.m4
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ else
dnl <sys/types.h> should be available everywhere!
cat > conftest.c <<EOF
#include <sys/types.h>
int main() { return 0; }
int main(int argc, const char *argv[]) { return 0; }
EOF
MKDEP="true"
for i in "$CC -MM" "$CC -M" "$CPP -MM" "$CPP -M" "cpp -M"; do
Expand Down
4 changes: 2 additions & 2 deletions build/apr_threads.m4
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void *thread_routine(void *data) {
return data;
}
int main() {
int main(int argc, const char *argv[]) {
pthread_t thd;
pthread_mutexattr_t mattr;
pthread_once_t once_init = PTHREAD_ONCE_INIT;
Expand Down Expand Up @@ -228,7 +228,7 @@ AC_DEFUN([APR_CHECK_PTHREAD_RECURSIVE_MUTEX], [
#include <pthread.h>
#include <stdlib.h>
int main() {
int main(int argc, const char *argv[]) {
pthread_mutexattr_t attr;
pthread_mutex_t m;
Expand Down
12 changes: 6 additions & 6 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ AC_CACHE_CHECK([for dup3 support], [apr_cv_dup3],
[AC_TRY_RUN([
#include <unistd.h>

int main()
int main(int argc, const char *argv[])
{
return dup3(STDOUT_FILENO, STDERR_FILENO, 0) == -1;
}], [apr_cv_dup3=yes], [apr_cv_dup3=no], [apr_cv_dup3=no])])
Expand Down Expand Up @@ -1205,7 +1205,7 @@ AC_CACHE_CHECK([for SOCK_CLOEXEC support], [apr_cv_sock_cloexec],
#include <sys/types.h>
#include <sys/socket.h>

int main()
int main(int argc, const char *argv[])
{
return socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0) == -1;
}], [apr_cv_sock_cloexec=yes], [apr_cv_sock_cloexec=no], [apr_cv_sock_cloexec=no])])
Expand Down Expand Up @@ -1402,7 +1402,7 @@ if test "$ac_cv_func_mmap" = "yes" &&
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
int main()
int main(int argc, const char *argv[])
{
int fd;
void *m;
Expand Down Expand Up @@ -2473,7 +2473,7 @@ AC_TRY_RUN([
#ifndef SEM_FAILED
#define SEM_FAILED (-1)
#endif
int main()
int main(int argc, const char *argv[])
{
sem_t *psem;
const char *sem_name = "/apr_autoconf";
Expand Down Expand Up @@ -2534,7 +2534,7 @@ if test "$threads" = "1"; then
#include <sys/types.h>
#include <pthread.h>
#include <stdlib.h>
int main()
int main(int argc, const char *argv[])
{
pthread_mutex_t mutex;
pthread_mutexattr_t attr;
Expand Down Expand Up @@ -2672,7 +2672,7 @@ const char *fname = "conftest.fcntl";

int lockit();

int main()
int main(int argc, const char *argv[])
{
int rc, status;;
proc_mutex_lock_it.l_whence = SEEK_SET; /* from current point */
Expand Down

0 comments on commit 6d8fa73

Please sign in to comment.