commit 96dce264019931944e1ef5101c2987d39aad3598
parent b9c5a5c879ca6e68acf56ed5798845a538f099aa
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 6 Jun 2006 18:41:58 +0000
various minor include fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3627 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -269,6 +269,8 @@ CVS code -
- nano.h:
- Reorder the toggle #defines to match their corresponding order
in toggle_init(). (DLR)
+ - Move the #include for sys/param.h here from nano.c, and add an
+ #ifdef around it. (DLR)
- prompt.c:
get_prompt_string()
- Include the handling of the help key even when help is
@@ -383,6 +385,10 @@ CVS code -
- Update the last copyright notice to include 2006. (DLR)
- configure.ac:
- Remove old warnings about color support. (DLR)
+ - Remove conditional header checks for fcntl.h and termios.h, as
+ nano won't build without them, and add conditional header
+ check for sys/param.h, as some systems need only limits.h.
+ (DLR)
- doc/faq.html:
- Add a new section 4.4, and move all section 4 entries after it
down one number, to explain how to deal with problems typing
diff --git a/configure.ac b/configure.ac
@@ -49,7 +49,7 @@ AC_DEFINE_DIR([PKGDATADIR], [pkgdatadir], [Where data are placed to.])
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termios.h wchar.h wctype.h)
+AC_CHECK_HEADERS(getopt.h libintl.h limits.h regex.h sys/param.h wchar.h wctype.h)
dnl Checks for options.
diff --git a/src/nano.c b/src/nano.c
@@ -30,7 +30,6 @@
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <sys/param.h>
#include <errno.h>
#include <ctype.h>
#include <locale.h>
diff --git a/src/nano.h b/src/nano.h
@@ -40,6 +40,10 @@
#include <limits.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
/* Macros for flags. */
#define SET(bit) flags |= bit
#define UNSET(bit) flags &= ~bit