Fix more header-related warnings.

This fixes all current default warnings with GCC7 on Linux.  That does
not mean the code is anywhere close to clean.
This commit is contained in:
John "Elwin" Edwards 2017-09-22 16:24:40 -04:00
parent 90d5708d84
commit 614dcfffd2
10 changed files with 53 additions and 15 deletions

View file

@ -38,6 +38,11 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#ifdef CHECKTIME
#include <unistd.h>
#endif
#include "rogue.h"
int num_checks; /* times we've gone over in checkout() */
@ -266,9 +271,9 @@ checkout(int s)
#ifdef CHECKTIME
checktime = (CHECKTIME * 60) / num_checks;
#endif
#ifdef SIGALRM
alarm(checktime);
#endif
#endif
chmsg(msgs[num_checks - 1], ((double) checktime / 60.0));

View file

@ -43,6 +43,8 @@
#undef MOUSE_MOVED
#elif defined(__DJGPP__)
#include <process.h>
#else
#include <sys/wait.h>
#endif
#ifdef HAVE_PWD_H
@ -54,6 +56,9 @@
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef __INTERIX
char *strdup(const char *s);
@ -535,7 +540,7 @@ int md_endian = 0x01020304;
unsigned long int
md_ntohl(unsigned long int x)
{
#ifdef _WIN32
#ifndef HAVE_ARPA_INET_H
if ( *((char *)&md_endian) == 0x01 )
return(x);
else
@ -551,7 +556,7 @@ md_ntohl(unsigned long int x)
unsigned long int
md_htonl(unsigned long int x)
{
#ifdef _WIN32
#ifndef HAVE_ARPA_INET_H
if ( *((char *)&md_endian) == 0x01 )
return(x);
else