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:
parent
90d5708d84
commit
614dcfffd2
10 changed files with 53 additions and 15 deletions
|
|
@ -13,7 +13,7 @@ AC_PROG_CC
|
|||
MP_WITH_CURSES
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h])
|
||||
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h arpa/inet.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_TYPE_SIZE_T
|
||||
|
|
|
|||
|
|
@ -41,11 +41,16 @@
|
|||
#undef MOUSE_MOVED
|
||||
#elif defined(__DJGPP__)
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
|
@ -552,7 +557,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
|
||||
|
|
@ -568,7 +573,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue