28 Commits

Author SHA1 Message Date
Daria Phoebe Brashear
133f517482 rewrite fallthrough to HEIM_FALLTHROUGH to deal with new Apple SDKs
Apple clang version 14.0.0 (clang-1400.0.17.3.1) fails the build
because stds.h defines `fallthrough` as a macro which is then
expanded when base.h evaluates

  # if __has_attribute(fallthrough) && __clang_major__ >= 5

The macOS SDK defines `DISPATCH_FALLTHROUGH` as the macro instead
of `fallthrough`.

This change replaces the use of `fallthrough` in the tree with
`HEIM_FALLTHROUGH` and updates the declaration in configure logic
to define `HEIM_FALLTHROUGH` based upon existing definitions
(if any) of `fallthrough` or `DISPATCH_FALLTHROUGH`.
2022-09-16 15:58:45 -04:00
Jeffrey Altman
04527412e3 Follow the Linux kernel's lead on "fallthrough"
The pseudo keyword 'fallthrough' is defined such that case statement
blocks must end with any of these keywords:
 * break;
 * fallthrough;
 * continue;
 * goto <label>;
 * return [expression];
 *
 *  gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes

The macro is defined either as

  __attribute__((__fallthrough__))

or as

  do {} while (0)  /* fallthrough */

not including the semicolon.

This change implements the Linux kernel style and updates several locations
where "/*fallthrough*/ and /* FALLTHROUGH */ were not previously replaced.

Externally imported code such as libedit, libtommath and sqlite are
restored to their unaltered state.

Change-Id: I69db8167b0d5884f55d96d72de3059a0235a1ba3
2022-01-21 10:39:47 -05:00
Nicolas Williams
c607135a03 Use fallthrough statement attribute (moar) 2022-01-14 16:53:34 -06:00
Nicolas Williams
ddc6113610 Use fallthrough statement attribute 2022-01-14 16:32:58 -06:00
Jeffrey Altman
6426e7550f roken: do not globally define 'timezone' and 'tzname'
ec866e635e
("Windows 10 SDK build fixes") introduced CPP macros

  timezone -> _timezone
  tzname   -> _tzname

but these names are common and the macros rewrite too much.

The name mapping is only required when building strftime.c
with Visual Studio 2017 and later.  Move the definitions
into strftime.c.

Change-Id: Ic813bff842124595fd3d86761cee6dcea4ae44e4
2022-01-14 14:56:39 -05:00
Love Hörnquist Åstrand
4337582a64 add missing break, quiet clang analyzer 2011-06-19 10:28:51 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Asanka Herath
d00f9984a5 Make roken build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 21:42:02 -08:00
Love Hornquist Astrand
c5264d42f4 drop rcsid 2009-09-07 21:24:36 -07:00
Love Hörnquist Åstrand
0d31d3d686 drop rcsid
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24356 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:30:37 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
bf3a926e28 rewrite str[pf]time for testing.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21896 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-09 08:46:08 +00:00
Love Hörnquist Åstrand
e21b42f40c rk_UNCONST argument mktime
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15413 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 16:55:55 +00:00
Love Hörnquist Åstrand
709aa58c74 define ROKEN_LIB_FUNCTION on all exported functions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14773 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-12 11:29:18 +00:00
Johan Danielsson
91141a8897 only use altzone if we have it
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11159 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-20 12:42:37 +00:00
Assar Westerlund
e5dc1de327 (strftime): check for return values from snprintf() < 0
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10654 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-04 09:53:51 +00:00
Assar Westerlund
5515fde49a merge roken independence stuff
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8597 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-08 14:22:12 +00:00
Assar Westerlund
0c65782ee3 (strftime): handle %z' and %Z' in a tm_gmtoff-less world
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7377 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-13 04:18:33 +00:00
Assar Westerlund
1daa01306f replace the BSD implementation by one of our own coding
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7348 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-12 15:31:14 +00:00
Assar Westerlund
5cdca3a638 lots of includes and HAVE_FOO_H
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2153 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-11 20:26:10 +00:00
Assar Westerlund
7d867a8463 removed __P
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1602 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-04-20 06:18:10 +00:00
Assar Westerlund
85ed18dbb3 Use TIME_WITH_SYS_TIME
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1601 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-04-20 05:51:30 +00:00
Assar Westerlund
239db0f710 removed all stupid register declarations
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1033 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-11-17 20:04:43 +00:00
Assar Westerlund
a822972294 Do not use #if, use #ifdef.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@910 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-10-28 16:32:50 +00:00
Assar Westerlund
7d69e8a197 hacks to make it compile everywhere
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@260 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-02-11 16:07:55 +00:00
Unknown User d91-jda
6d708ad37f Minor cleanup.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@223 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-02-04 14:13:36 +00:00
Unknown User d91-jda
b33abb44fd Initial revision
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@171 ec53bebd-3082-4978-b11e-865c3cabbd6b
1995-10-23 11:20:30 +00:00