summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-26 13:08:49 +0000
committerGitHub <noreply@github.com>2022-11-26 18:38:49 +0530
commite35ca417fe81a64985c2b29e863ce418ae75b96e (patch)
treec24310c69d432574a1d08ef360e1069e0dae5fd2 /configure
parent47d673d81fc315069c14f9438ebe61fb70ef1ccc (diff)
downloadcpython-git-e35ca417fe81a64985c2b29e863ce418ae75b96e.tar.gz
gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (#99406)
Follow up to 12078e78f6e4a21f344e4eaff529e1ff3b97734f.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure52
1 files changed, 28 insertions, 24 deletions
diff --git a/configure b/configure
index 047fd94219..3f8daf9dad 100755
--- a/configure
+++ b/configure
@@ -6755,7 +6755,7 @@ if test "x$enable_profiling" = xyes; then
CC="$CC -pg"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-int main() { return 0; }
+int main(void) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -9220,7 +9220,7 @@ else
void* routine(void* p){return NULL;}
-int main(){
+int main(void){
pthread_t p;
if(pthread_create(&p,NULL,routine,NULL)!=0)
return 1;
@@ -9275,7 +9275,7 @@ else
void* routine(void* p){return NULL;}
-int main(){
+int main(void){
pthread_t p;
if(pthread_create(&p,NULL,routine,NULL)!=0)
return 1;
@@ -9324,7 +9324,7 @@ else
void* routine(void* p){return NULL;}
-int main(){
+int main(void){
pthread_t p;
if(pthread_create(&p,NULL,routine,NULL)!=0)
return 1;
@@ -9373,7 +9373,7 @@ else
void* routine(void* p){return NULL;}
-int main(){
+int main(void){
pthread_t p;
if(pthread_create(&p,NULL,routine,NULL)!=0)
return 1;
@@ -12233,7 +12233,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-int main()
+int main(void)
{
char s[16];
int i, *p1, *p2;
@@ -15042,6 +15042,7 @@ $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
/* end confdefs.h. */
#include <stdio.h>
+#include <stdlib.h>
#include <pthread.h>
void * start_routine (void *arg) { exit (0); }
@@ -15352,7 +15353,7 @@ else
void *foo(void *parm) {
return NULL;
}
- int main() {
+ int main(void) {
pthread_attr_t attr;
pthread_t id;
if (pthread_attr_init(&attr)) return (-1);
@@ -16954,7 +16955,7 @@ else
#include <sys/stat.h>
#include <unistd.h>
-int main(int argc, char*argv[])
+int main(int argc, char *argv[])
{
if(chflags(argv[0], 0) != 0)
return 1;
@@ -17003,7 +17004,7 @@ else
#include <sys/stat.h>
#include <unistd.h>
-int main(int argc, char*argv[])
+int main(int argc, char *argv[])
{
if(lchflags(argv[0], 0) != 0)
return 1;
@@ -19711,7 +19712,7 @@ else
#include <sys/socket.h>
#include <netinet/in.h>
-int main()
+int main(void)
{
int passive, gaierr, inet4 = 0, inet6 = 0;
struct addrinfo hints, *ai, *aitop;
@@ -20908,7 +20909,7 @@ else
#include <stdlib.h>
#include <math.h>
-int main() {
+int main(void) {
volatile double x, y, z;
/* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
x = 0.99999999999999989; /* 1-2**-53 */
@@ -21687,7 +21688,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-int main()
+int main(void)
{
return (((-1)>>3 == -1) ? 0 : 1);
}
@@ -22589,7 +22590,7 @@ else
#include <stdlib.h>
#include <unistd.h>
-int main()
+int main(void)
{
int val1 = nice(1);
if (val1 != -1 && val1 == nice(2))
@@ -22631,7 +22632,7 @@ else
#include <poll.h>
#include <unistd.h>
-int main()
+int main(void)
{
struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
int poll_test;
@@ -22688,7 +22689,7 @@ else
extern char *tzname[];
#endif
-int main()
+int main(void)
{
/* Note that we need to ensure that not only does tzset(3)
do 'something' with localtime, but it works as documented
@@ -24350,9 +24351,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stddef.h>
#include <stdio.h>
-#include<stdlib.h>
-int main() {
+#include <stdlib.h>
+int main(void) {
size_t len = -1;
const char *str = "text";
len = mbstowcs(NULL, str, 0);
@@ -24552,7 +24554,7 @@ else
#include <stdlib.h>
#include <string.h>
void foo(void *p, void *q) { memmove(p, q, 19); }
-int main() {
+int main(void) {
char a[32] = "123456789000000000";
foo(&a[9], a);
if (strcmp(a, "123456789123456789000000000") != 0)
@@ -24607,7 +24609,7 @@ else
);
return r;
}
- int main() {
+ int main(void) {
int p = 8;
if ((foo(&p) ? : p) != 6)
return 1;
@@ -24650,7 +24652,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <stdatomic.h>
atomic_int int_var;
atomic_uintptr_t uintptr_var;
- int main() {
+ int main(void) {
atomic_store_explicit(&int_var, 5, memory_order_relaxed);
atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
@@ -24691,7 +24693,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
int val;
- int main() {
+ int main(void) {
__atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
(void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
return 0;
@@ -24767,7 +24769,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <dirent.h>
- int main() {
+ int main(void) {
struct dirent entry;
return entry.d_type == DT_UNKNOWN;
}
@@ -24805,11 +24807,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stddef.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/random.h>
- int main() {
+ int main(void) {
char buffer[1];
const size_t buflen = sizeof(buffer);
const int flags = GRND_NONBLOCK;
@@ -24852,9 +24855,10 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stddef.h>
#include <sys/random.h>
- int main() {
+ int main(void) {
char buffer[1];
const size_t buflen = sizeof(buffer);
const int flags = 0;