Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet C++ does not permit static a data member to have...



details:   https://anonhg.NetBSD.org/src/rev/727024e940e2
branches:  trunk
changeset: 542368:727024e940e2
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Jan 27 09:57:09 2003 +0000

description:
C++ does not permit static a data member to have the same name as its
class, so in a C++ environment rename the ip_opts member to Ip_opts as
observed in several other implementations; from Jon Olsson in
PR toolchain/19880.

diffstat:

 sys/netinet/in.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 35bd8f935220 -r 727024e940e2 sys/netinet/in.h
--- a/sys/netinet/in.h  Mon Jan 27 09:52:27 2003 +0000
+++ b/sys/netinet/in.h  Mon Jan 27 09:57:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.h,v 1.58 2002/05/13 13:34:32 kleink Exp $   */
+/*     $NetBSD: in.h,v 1.59 2003/01/27 09:57:09 kleink Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -241,7 +241,11 @@
  */
 struct ip_opts {
        struct in_addr  ip_dst;         /* first hop, 0 w/o src rt */
+#if defined(__cplusplus)
+       __int8_t        Ip_opts[40];    /* actually variable in size */
+#else
        __int8_t        ip_opts[40];    /* actually variable in size */
+#endif
 };
 
 /*



Home | Main Index | Thread Index | Old Index