Commit Graph

43 Commits

Author SHA1 Message Date
Jeffrey Altman 4caaa7ca0b include: bits conditionalize behavior on HAVE_SNPRINTF
ee2a92c547 ("bits: Fix warnings")
introduced unconditional use of snprintf().   Use of snprintf in
most of the tree is acceptable whenever roken is available because
roken provides snprintf() for platforms that do not provide it.
However, bits.c cannot use roken and therefore must not
unconditionally call snprintf().

This change restores the prior implementation of BITSIZE(TYPE)
when HAVE_SNPRINTF is undefined.

Change-Id: Ibbd2f003abe9f9fb612719266544cfd545809a18
2022-01-14 12:17:39 -05:00
Nicolas Williams ee2a92c547 bits: Fix warnings 2022-01-13 15:33:04 -06:00
Nicolas Williams 6a0f45c4d7 Use __attribute__ ((__name__)) form
Protect against macros named noreturn and so on.
2017-03-13 18:39:41 -04:00
Nicolas Williams 1c81ddf4e2 Round #2 of scan-build warnings cleanup 2016-11-16 17:03:14 -06:00
Jelmer Vernooij 0113798b18 Don't put system architecture in generated headers.
Including HOST causes the build to be unreproducible.
2016-05-15 23:04:49 +00:00
Jeffrey Altman d9bc256199 define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE
Always define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE even if attributes are
not supported.

Change-Id: Ibc2110d809d81f546723853038c69176075d6013
2014-02-04 23:20:10 -05:00
Love Hornquist Astrand 516c12c9a9 intruduce krb5_generate_random() that can fail and return an error, check for it at krb5_context creation time 2013-10-21 08:22:02 -07:00
Love Hörnquist Åstrand b8ddbe73c4 quite down clang analyzer warnings for the generate asn1 code 2011-06-14 22:29:49 -07:00
Asanka C. Herath d11917211b Windows: Older Windows SDKs need <winsock2.h>
Older SDKs need <winsock2.h> to be included before <ws2tcpip.h>
2010-11-24 15:33:06 -05:00
Love Hornquist Astrand a77070f5b1 define helper macros for __attribute__ 2010-10-26 23:39:42 -07:00
Asanka Herath f54630328b strlen() returns a size_t 2010-05-26 10:38:38 -04:00
Asanka Herath 251879f39e Generate krb5-types.h instead of using a static one on Windows 2009-11-25 12:43:12 -05:00
Love Hornquist Astrand 052d34e611 define a socket type, krb5_socket_t 2009-11-24 13:36:03 -08:00
Love Hörnquist Åstrand 58d847961a Close f if its not stdout, from cppcheck
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25275 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-08 20:32:59 +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 6755cbbe9b Avoid creating a file called --version.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18703 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 20:33:58 +00:00
Love Hörnquist Åstrand 9ac4a61af1 argc > 1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18694 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 20:19:08 +00:00
Love Hörnquist Åstrand 294dbe06fb Avoid creating a file called --version.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18693 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 20:19:07 +00:00
Love Hörnquist Åstrand 6775b0046e Include Xint64 types.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18417 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-12 10:01:48 +00:00
Love Hörnquist Åstrand 978ae789ab constify to avoid warning with -Wwrite-string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14476 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 15:22:02 +00:00
Johan Danielsson 4be22c24ea we may need unistd.h for ssize_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11259 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-28 16:08:44 +00:00
Johan Danielsson 9882fc6ae6 same with krb5_ssize_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11181 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-21 09:04:28 +00:00
Johan Danielsson 14eefe52c1 define krb5_socklen_t type; this should really go someplace else, but
this was easy


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11127 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-19 13:51:19 +00:00
Johan Danielsson fe181a304d include <sys/socket.h> to get socklen_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10930 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-18 11:45:46 +00:00
Assar Westerlund 8568267343 add __attribute__ for gcc's pleasure
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9012 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-27 05:42:46 +00:00
Johan Danielsson c012233f01 define uint*_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8879 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-31 10:57:41 +00:00
Johan Danielsson c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Assar Westerlund 9e21bb2916 another warning destroyed
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5731 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-24 04:04:10 +00:00
Assar Westerlund cbb7abe5f1 (my_strupr): cast away some stupid warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5725 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-24 03:02:00 +00:00
Johan Danielsson acc640958b <bind/bitypes.h>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5688 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-21 18:58:11 +00:00
Assar Westerlund b990bcf7bf s/strup/my_strupr/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4829 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-01 05:17:39 +00:00
Johan Danielsson 5848e789ab Fix warning.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3957 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-12 00:03:27 +00:00
Assar Westerlund dc88e6268e static-ize
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3752 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-02 04:07:52 +00:00
Johan Danielsson c3d687f4a2 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3393 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-09-05 18:02:40 +00:00
Assar Westerlund 7f9972ff58 Don't generate ifndef's in bits.h. Instead, use them when building
the program.  This makes it possible to include bits.h without having
defined all HAVE_INT17_T symbols.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3343 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-09-02 18:46:16 +00:00
Johan Danielsson 9419ca2356 Don't include ifdefs in output.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3035 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-16 21:18:28 +00:00
Johan Danielsson 5fb9667b70 Include inttypes.h, sys/bitypes.h, and netinet/in6_machtypes.h in bits.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2871 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-10 04:05:47 +00:00
Johan Danielsson 5a32a5c8e7 Add copyright notice.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2389 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-16 21:40:05 +00:00
Johan Danielsson 6be3fc66bb Must use signed char.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2135 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-10 05:57:14 +00:00
Johan Danielsson 417cced042 Add blocking of __BIT_TYPES_DEFINED__.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1422 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-03-14 06:47:30 +00:00
Johan Danielsson 72c9c05133 Fix some warnings.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1104 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-12-15 16:47:45 +00:00
Johan Danielsson b96bc32e40 *** empty log message ***
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@880 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-10-22 22:32:57 +00:00