Skip to content

Commit

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


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1917642 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed May 10, 2024
1 parent 639ad0b commit eecbe1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/apr_common.m4
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,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
16 changes: 8 additions & 8 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ int weak_noop(void)
{
return 0;
}
int main()
int main(int argc, char **argv)
{
return weak_noop();
}], [ap_cv_weak_symbols=yes], [ap_cv_weak_symbols=no], [ap_cv_weak_symbols=no])])
Expand Down Expand Up @@ -1183,7 +1183,7 @@ AC_CACHE_CHECK([for asio -> message queue support], [apr_cv_aio_msgq],
#define _AIO_OS390
#include <aio.h>

int main()
int main(int argc, const char *argv[])
{
struct aiocb a;

Expand All @@ -1201,7 +1201,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 @@ -1278,7 +1278,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 @@ -1335,7 +1335,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 @@ -2476,7 +2476,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 @@ -2537,7 +2537,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 @@ -2675,7 +2675,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 eecbe1f

Please sign in to comment.