Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 08:35:15 +0200
From:      Ed Schouten <ed@nuxi.nl>
To:        "Conrad E. Meyer" <cem@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r300824 - head/lib/libmd
Message-ID:  <CABh_MKnyrLOjSOdmeZn=6uVmV73fM4XXo1bXnOpja7K7UvzpCw@mail.gmail.com>
In-Reply-To: <201605270531.u4R5VE6R006890@repo.freebsd.org>
References:  <201605270531.u4R5VE6R006890@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Conrad,

2016-05-27 7:31 GMT+02:00 Conrad E. Meyer <cem@freebsd.org>:
>   libmd: Work around C++'s inability to understand C

So C++ doesn't support using 'static' within array types, right? What
I personally dislike about this specific change:

- Including <sys/md5.h> directly still doesn't work.
- If <sys/md5.h> is ever going to include a 'static inline' function,
the static keyword would also be stripped off.

Would it make sense to come up with a macro in <sys/cdefs.h> to deal with this?

#if defined(__cplusplus) || defined(ancient compiler)
#define __minimum_size(n) n
#else
#define __minimum_size(n) static (n)
#endif

That way we can annotate this everwhere we'd want, without needing to
care about compiler versions, languages, etc.

-- 
Ed Schouten <ed@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MKnyrLOjSOdmeZn=6uVmV73fM4XXo1bXnOpja7K7UvzpCw>