Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include/protocols These all need stdint.h.



details:   https://anonhg.NetBSD.org/src/rev/d1f5568c18fe
branches:  trunk
changeset: 343100:d1f5568c18fe
user:      dholland <dholland%NetBSD.org@localhost>
date:      Fri Jan 22 23:11:50 2016 +0000

description:
These all need stdint.h.

Also, dumprestore.h needs ufs/ufs/dinode.h; in talkd.h use unsigned
char instead of u_char; and in timed.h include limits.h and use
_POSIX_HOST_NAME_MAX instead of MAXHOSTNAMELEN as the latter would
require sys/param.h.

diffstat:

 include/protocols/dumprestore.h |   5 ++++-
 include/protocols/routed.h      |   5 ++++-
 include/protocols/rwhod.h       |   4 +++-
 include/protocols/talkd.h       |  20 +++++++++++---------
 include/protocols/timed.h       |   7 +++++--
 5 files changed, 27 insertions(+), 14 deletions(-)

diffs (132 lines):

diff -r 83aeaea5d333 -r d1f5568c18fe include/protocols/dumprestore.h
--- a/include/protocols/dumprestore.h   Fri Jan 22 23:06:10 2016 +0000
+++ b/include/protocols/dumprestore.h   Fri Jan 22 23:11:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dumprestore.h,v 1.17 2015/11/16 17:09:56 christos Exp $        */
+/*     $NetBSD: dumprestore.h,v 1.18 2016/01/22 23:11:50 dholland Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,6 +39,9 @@
 #ifndef _PROTOCOLS_DUMPRESTORE_H_
 #define _PROTOCOLS_DUMPRESTORE_H_
 
+#include <stdint.h>
+#include <ufs/ufs/dinode.h>
+
 /*
  * TP_BSIZE is the size of file blocks on the dump tapes.
  * Note that TP_BSIZE must be a multiple of DEV_BSIZE.
diff -r 83aeaea5d333 -r d1f5568c18fe include/protocols/routed.h
--- a/include/protocols/routed.h        Fri Jan 22 23:06:10 2016 +0000
+++ b/include/protocols/routed.h        Fri Jan 22 23:11:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: routed.h,v 1.14 2005/12/26 19:01:47 perry Exp $        */
+/*     $NetBSD: routed.h,v 1.15 2016/01/22 23:11:50 dholland Exp $     */
 
 /*-
  * Copyright (c) 1983, 1989, 1993
@@ -33,6 +33,9 @@
 
 #ifndef _PROTOCOLS_ROUTED_H_
 #define        _PROTOCOLS_ROUTED_H_
+
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff -r 83aeaea5d333 -r d1f5568c18fe include/protocols/rwhod.h
--- a/include/protocols/rwhod.h Fri Jan 22 23:06:10 2016 +0000
+++ b/include/protocols/rwhod.h Fri Jan 22 23:11:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rwhod.h,v 1.7 2003/08/07 09:44:13 agc Exp $    */
+/*     $NetBSD: rwhod.h,v 1.8 2016/01/22 23:11:50 dholland Exp $       */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,6 +34,8 @@
 #ifndef _PROTOCOLS_RWHOD_H_
 #define        _PROTOCOLS_RWHOD_H_
 
+#include <stdint.h>
+
 /*
  * rwho protocol packet format.
  */
diff -r 83aeaea5d333 -r d1f5568c18fe include/protocols/talkd.h
--- a/include/protocols/talkd.h Fri Jan 22 23:06:10 2016 +0000
+++ b/include/protocols/talkd.h Fri Jan 22 23:11:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: talkd.h,v 1.10 2005/12/26 19:01:47 perry Exp $ */
+/*     $NetBSD: talkd.h,v 1.11 2016/01/22 23:11:50 dholland Exp $      */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,6 +34,8 @@
 #ifndef _PROTOCOLS_TALKD_H_
 #define        _PROTOCOLS_TALKD_H_
 
+#include <stdint.h>
+
 /*
  * This describes the protocol used by the talk server and clients.
  *
@@ -64,10 +66,10 @@
  * Client->server request message format.
  */
 typedef struct {
-       u_char    vers;                 /* protocol version */
-       u_char    type;                 /* request type, see below */
-       u_char    answer;               /* not used */
-       u_char    pad;
+       unsigned char vers;             /* protocol version */
+       unsigned char type;             /* request type, see below */
+       unsigned char answer;           /* not used */
+       unsigned char pad;
        uint32_t id_num;                /* message id */
        struct    talkd_sockaddr addr;  /* old (4.3) style */
        struct    talkd_sockaddr ctl_addr;/* old (4.3) style */
@@ -83,10 +85,10 @@
  * Server->client response message format.
  */
 typedef struct {
-       u_char    vers;         /* protocol version */
-       u_char    type;         /* type of request message, see below */
-       u_char    answer;       /* respose to request message, see below */
-       u_char    pad;
+       unsigned char vers;     /* protocol version */
+       unsigned char type;     /* type of request message, see below */
+       unsigned char answer;   /* respose to request message, see below */
+       unsigned char pad;
        uint32_t id_num;        /* message id */
        struct    talkd_sockaddr addr; /* address for establishing conversation */
 } CTL_RESPONSE;
diff -r 83aeaea5d333 -r d1f5568c18fe include/protocols/timed.h
--- a/include/protocols/timed.h Fri Jan 22 23:06:10 2016 +0000
+++ b/include/protocols/timed.h Fri Jan 22 23:11:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: timed.h,v 1.11 2008/02/16 07:30:15 matt Exp $  */
+/*     $NetBSD: timed.h,v 1.12 2016/01/22 23:11:50 dholland Exp $      */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,6 +34,9 @@
 #ifndef        _PROTOCOLS_TIMED_H_
 #define        _PROTOCOLS_TIMED_H_
 
+#include <stdint.h>
+#include <limits.h>
+
 /*
  * Time Synchronization Protocol
  */
@@ -52,7 +55,7 @@
                } tspu_time;
                char tspu_hopcnt;
        } tsp_u;
-       char tsp_name[MAXHOSTNAMELEN];
+       char tsp_name[_POSIX_HOST_NAME_MAX];
 };
 
 #define        tsp_time        tsp_u.tspu_time



Home | Main Index | Thread Index | Old Index