[hipl-commit] [trunk] Rev 4187: HOST_NAME_MAX is a standard definition from limits.h, no need to duplicate it.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 8 Apr 2010 19:03:03 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 08/04/2010 at 19:03:03
Revision: 4187
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  HOST_NAME_MAX is a standard definition from limits.h, no need to duplicate it.

Modified:
  M  hipd/hadb.c
  M  hipd/init.c
  M  lib/core/hostid.c
  M  lib/core/hostsfiles.c
  M  lib/core/hostsfiles.h

=== modified file 'hipd/hadb.c'
--- hipd/hadb.c 2010-03-29 17:50:59 +0000
+++ hipd/hadb.c 2010-04-08 16:02:42 +0000
@@ -39,6 +39,8 @@
 /* required for s6_addr32 */
 #define _BSD_SOURCE
 
+#include <limits.h>
+
 #include "config.h"
 #include "hadb.h"
 #include "hipd.h"

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-03-30 12:41:08 +0000
+++ hipd/init.c 2010-04-08 16:02:42 +0000
@@ -10,6 +10,7 @@
 /* required for s6_addr32 */
 #define _BSD_SOURCE
 
+#include <limits.h>
 #include <sys/prctl.h>
 #include <sys/types.h>
 #include <netinet/icmp6.h>

=== modified file 'lib/core/hostid.c'
--- lib/core/hostid.c   2010-03-18 12:09:47 +0000
+++ lib/core/hostid.c   2010-04-08 16:02:42 +0000
@@ -20,11 +20,6 @@
 #include "hostid.h"
 #include "filemanip.h"
 
-/* needed due to missing system inlcude for openWRT */
-#ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX           64
-#endif
-
 #define HOST_ID_FILENAME_MAX_LEN 256
 
 

=== modified file 'lib/core/hostsfiles.c'
--- lib/core/hostsfiles.c       2010-03-17 13:11:49 +0000
+++ lib/core/hostsfiles.c       2010-04-08 16:02:42 +0000
@@ -19,6 +19,7 @@
 #define _BSD_SOURCE
 
 #include <arpa/inet.h>
+#include <limits.h>
 #include <time.h>
 #include <netinet/in.h>
 

=== modified file 'lib/core/hostsfiles.h'
--- lib/core/hostsfiles.h       2010-03-19 09:00:54 +0000
+++ lib/core/hostsfiles.h       2010-04-08 16:02:42 +0000
@@ -9,10 +9,6 @@
 #include "prefix.h"
 #include "lib/conf/hipconf.h"
 
-#ifndef HOST_NAME_MAX
-#  define HOST_NAME_MAX 64
-#endif /* HOST_NAME_MAX */
-
 int hip_map_first_id_to_hostname_from_hosts(const struct hosts_file_line 
*entry,
                                             const void *arg,
                                             void *result);

Other related posts:

  • » [hipl-commit] [trunk] Rev 4187: HOST_NAME_MAX is a standard definition from limits.h, no need to duplicate it. - Diego Biurrun