Skip to content

Enable -Werror=undef for core #4428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 4, 2021
2 changes: 1 addition & 1 deletion builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "iseq.h"
#include "builtin.h"

#if CROSS_COMPILING
#ifdef CROSS_COMPILING

#define INCLUDED_BY_BUILTIN_C 1
#include "mini_builtin.c"
Expand Down
2 changes: 1 addition & 1 deletion builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
static inline VALUE
rb_vm_lvar(rb_execution_context_t *ec, int index)
{
#if VM_CORE_H_EC_DEFINED
#if defined(VM_CORE_H_EC_DEFINED) && VM_CORE_H_EC_DEFINED
return ec->cfp->ep[index];
#else
return rb_vm_lvar_exposed(ec, index);
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
-Werror=pointer-arith \
-Werror=shorten-64-to-32 \
-Werror=write-strings \
-Werror=undef \
-Wimplicit-fallthrough=0 \
-Wmissing-noreturn \
-Wno-cast-function-type \
Expand Down
3 changes: 3 additions & 0 deletions coroutine/copy/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@

#define COROUTINE __attribute__((noreturn)) void

#ifdef HAVE_STDINT_H
#include <stdint.h>
#if INTPTR_MAX <= INT32_MAX
#define COROUTINE_LIMITED_ADDRESS_SPACE
#endif
#endif

// This stack copying implementation which uses a private stack for each coroutine, including the main one.
#define COROUTINE_PRIVATE_STACK
Expand Down
3 changes: 3 additions & 0 deletions coroutine/ucontext/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@

#define COROUTINE __attribute__((noreturn)) void

#ifdef HAVE_STDINT_H
#include <stdint.h>
#if INTPTR_MAX <= INT32_MAX
#define COROUTINE_LIMITED_ADDRESS_SPACE
#endif
#endif

struct coroutine_context
{
Expand Down
8 changes: 4 additions & 4 deletions dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# define HAVE_DIRENT_NAMLEN 1
# if HAVE_SYS_NDIR_H
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
# ifdef _WIN32
Expand Down Expand Up @@ -216,7 +216,7 @@ typedef enum {
#else
#define FNM_SYSCASE 0
#endif
#if _WIN32
#ifdef _WIN32
#define FNM_SHORTNAME 0x20
#else
#define FNM_SHORTNAME 0
Expand Down
2 changes: 1 addition & 1 deletion eval_intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);

#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)

#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || __clang__
#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || defined __clang__
/* This macro prevents GCC 4.6--4.8 from emitting maybe-uninitialized warnings.
* This macro also prevents Clang from dumping core in EC_EXEC_TAG().
* (I confirmed Clang 4.0.1 and 5.0.0.)
Expand Down
2 changes: 1 addition & 1 deletion ext/bigdecimal/missing.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern "C" {
# if __has_builtin(__builtin_unreachable)
# define UNREACHABLE __builtin_unreachable()

# elif HAVE___ASSUME
# elif defined(HAVE___ASSUME)
# define UNREACHABLE __assume(0)

# else
Expand Down
2 changes: 1 addition & 1 deletion ext/cgi/escape/escape.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ cgiesc_unescape(int argc, VALUE *argv, VALUE self)
void
Init_escape(void)
{
#if HAVE_RB_EXT_RACTOR_SAFE
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/monitor/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ monitor_synchronize(VALUE monitor)
void
Init_monitor(void)
{
#if HAVE_RB_EXT_RACTOR_SAFE
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif

Expand Down
4 changes: 2 additions & 2 deletions ext/nkf/nkf-utf8/nkf.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#define X0201_DEFAULT TRUE
#endif

#if DEFAULT_NEWLINE == 0x0D0A
#elif DEFAULT_NEWLINE == 0x0D
#if defined(DEFAULT_NEWLINE) && DEFAULT_NEWLINE == 0x0D0A
#elif defined(DEFAULT_NEWLINE) && DEFAULT_NEWLINE == 0x0D
#else
#define DEFAULT_NEWLINE 0x0A
#endif
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_pkey_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
if (EC_POINT_mul(group, point_result, bn_g, point_self, bn, ossl_bn_ctx) != 1)
ossl_raise(eEC_POINT, NULL);
} else {
#if OPENSSL_VERSION_MAJOR+0 >= 3 || defined(LIBRESSL_VERSION_NUMBER)
#if (defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3) || defined(LIBRESSL_VERSION_NUMBER)
rb_raise(rb_eNotImpError, "calling #mul with arrays is not" \
"supported by this OpenSSL version");
#else
Expand Down
2 changes: 1 addition & 1 deletion ext/psych/yaml/yaml_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include RUBY_EXTCONF_H
#endif

#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/racc/cparse/cparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ reduce0(RB_BLOCK_CALL_FUNC_ARGLIST(_, data))
void
Init_cparse(void)
{
#if HAVE_RB_EXT_RACTOR_SAFE
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -4564,7 +4564,7 @@ zlib_gunzip_run(VALUE arg)
void
Init_zlib(void)
{
#if HAVE_RB_EXT_RACTOR_SAFE
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif

Expand Down
6 changes: 3 additions & 3 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#ifdef HAVE_MALLOC_USABLE_SIZE
# ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
# include RUBY_ALTERNATIVE_MALLOC_HEADER
# elif HAVE_MALLOC_H
# elif defined(HAVE_MALLOC_H)
# include <malloc.h>
# elif defined(HAVE_MALLOC_NP_H)
# include <malloc_np.h>
Expand Down Expand Up @@ -381,7 +381,7 @@ static ruby_gc_params_t gc_params = {
#endif
#if RGENGC_DEBUG < 0 && !defined(_MSC_VER)
# define RGENGC_DEBUG_ENABLED(level) (-(RGENGC_DEBUG) >= (level) && ruby_rgengc_debug >= (level))
#elif HAVE_VA_ARGS_MACRO
#elif defined(HAVE_VA_ARGS_MACRO)
# define RGENGC_DEBUG_ENABLED(level) ((RGENGC_DEBUG) >= (level))
#else
# define RGENGC_DEBUG_ENABLED(level) 0
Expand Down Expand Up @@ -830,7 +830,7 @@ enum {
};
#define HEAP_PAGE_ALIGN (1 << HEAP_PAGE_ALIGN_LOG)
#define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN
#if defined(HAVE_MMAP) && (PAGE_SIZE <= HEAP_PAGE_SIZE)
#if defined(HAVE_MMAP) && (!defined(PAGE_SIZE) || PAGE_SIZE <= HEAP_PAGE_SIZE)
# define USE_MMAP_ALIGNED_ALLOC 1
#else
# define USE_MMAP_ALIGNED_ALLOC 0
Expand Down
2 changes: 1 addition & 1 deletion hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ ar_force_convert_table(VALUE hash, const char *file, int line)
if (RHASH_AR_TABLE(hash)) {
unsigned i, bound = RHASH_AR_TABLE_BOUND(hash);

#if RHASH_CONVERT_TABLE_DEBUG
#if defined(RHASH_CONVERT_TABLE_DEBUG) && RHASH_CONVERT_TABLE_DEBUG
rb_obj_info_dump(hash);
fprintf(stderr, "force_convert: %s:%d\n", file, line);
RB_DEBUG_COUNTER_INC(obj_hash_force_convert);
Expand Down
4 changes: 0 additions & 4 deletions include/ruby/backward/2/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,12 @@
#define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x
#if RBIMPL_HAS_ATTRIBUTE(error)
# define HAVE_ATTRIBUTE_ERRORFUNC 1
#else
# define HAVE_ATTRIBUTE_ERRORFUNC 0
#endif

#undef WARNINGFUNC
#define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x
#if RBIMPL_HAS_ATTRIBUTE(warning)
# define HAVE_ATTRIBUTE_WARNINGFUNC 1
#else
# define HAVE_ATTRIBUTE_WARNINGFUNC 0
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/internal/attr/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#endif

/** Enables #RBIMPL_ATTR_CONST if and only if. ! #RUBY_DEBUG. */
#if !RUBY_DEBUG
#if !defined(RUBY_DEBUG) || !RUBY_DEBUG
# define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST()
#else
# define RBIMPL_ATTR_CONST_UNLESS_DEBUG() /* void */
Expand Down
5 changes: 3 additions & 2 deletions include/ruby/internal/core/rbasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@

/** @cond INTERNAL_MACRO */
#define RBIMPL_EMBED_LEN_MAX_OF(T) \
RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
RBIMPL_CAST((int)(sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
/** @endcond */

enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 };
#define RBIMPL_RVALUE_EMBED_LEN_MAX 3
enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = RBIMPL_RVALUE_EMBED_LEN_MAX };

struct
RUBY_ALIGNAS(SIZEOF_VALUE)
Expand Down
15 changes: 15 additions & 0 deletions include/ruby/internal/has/builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
# define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
# define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0)
# define RBIMPL_HAS_BUILTIN___builtin_assume 0
# /* See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for bswap16. */
# define RBIMPL_HAS_BUILTIN___builtin_bswap16 RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
# define RBIMPL_HAS_BUILTIN___builtin_bswap32 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
Expand All @@ -67,6 +68,10 @@
# define RBIMPL_HAS_BUILTIN___builtin_popcount RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_popcountl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_popcountll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_rotateleft32 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateleft64 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateright32 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateright64 0
# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
# define RBIMPL_HAS_BUILTIN___builtin_unreachable RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0)
# /* Note that "0, 0, 0" might be inaccurate. */
Expand All @@ -79,7 +84,9 @@
# /* Take config.h definition when available */
# define RBIMPL_HAS_BUILTIN(_) ((RBIMPL_HAS_BUILTIN_ ## _)+0)
# define RBIMPL_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
# define RBIMPL_HAS_BUILTIN___builtin_alloca 0
# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
# define RBIMPL_HAS_BUILTIN___builtin_assume 0
# define RBIMPL_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED
# define RBIMPL_HAS_BUILTIN___builtin_bswap16 HAVE_BUILTIN___BUILTIN_BSWAP16
# define RBIMPL_HAS_BUILTIN___builtin_bswap32 HAVE_BUILTIN___BUILTIN_BSWAP32
Expand All @@ -89,15 +96,23 @@
# define RBIMPL_HAS_BUILTIN___builtin_clzll HAVE_BUILTIN___BUILTIN_CLZLL
# define RBIMPL_HAS_BUILTIN___builtin_constant_p HAVE_BUILTIN___BUILTIN_CONSTANT_P
# define RBIMPL_HAS_BUILTIN___builtin_ctz HAVE_BUILTIN___BUILTIN_CTZ
# define RBIMPL_HAS_BUILTIN___builtin_ctzl 0
# define RBIMPL_HAS_BUILTIN___builtin_ctzll HAVE_BUILTIN___BUILTIN_CTZLL
# define RBIMPL_HAS_BUILTIN___builtin_expect HAVE_BUILTIN___BUILTIN_EXPECT
# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW
# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P
# define RBIMPL_HAS_BUILTIN___builtin_popcount HAVE_BUILTIN___BUILTIN_POPCOUNT
# define RBIMPL_HAS_BUILTIN___builtin_popcountl 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateleft32 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateleft64 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateright32 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateright64 0
# define RBIMPL_HAS_BUILTIN___builtin_popcountll HAVE_BUILTIN___BUILTIN_POPCOUNTLL
# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
# if defined(UNREACHABLE)
# define RBIMPL_HAS_BUILTIN___builtin_unreachable 1
# else
# define RBIMPL_HAS_BUILTIN___builtin_unreachable 0
# endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion include/ruby/ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ VALUE rb_get_path_no_checksafe(VALUE);
((argc) == 0 ? (vargc) <= 1 : /* [ruby-core:85266] [Bug #14425] */ \
(argc) == (vargc))
# if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
# if HAVE_ATTRIBUTE_ERRORFUNC
# ifdef HAVE_ATTRIBUTE_ERRORFUNC
ERRORFUNC((" argument length doesn't match"), int rb_varargs_bad_length(int,int));
# else
# define rb_varargs_bad_length(argc, vargc) \
Expand Down
4 changes: 2 additions & 2 deletions internal/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
#define BIGNUM_EMBED_LEN_SHIFT \
(FL_USHIFT+3) /* bit offset of BIGNUM_EMBED_LEN_MASK */
#ifndef BIGNUM_EMBED_LEN_MAX
# if (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT) < (1 << BIGNUM_EMBED_LEN_NUMBITS)-1
# define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
# if (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT) < (1 << BIGNUM_EMBED_LEN_NUMBITS)-1
# define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
# else
# define BIGNUM_EMBED_LEN_MAX ((1 << BIGNUM_EMBED_LEN_NUMBITS)-1)
# endif
Expand Down
4 changes: 2 additions & 2 deletions memory_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ extract_item_member(const uint8_t *ptr, const rb_memory_view_item_component_t *m
return LL2NUM(val.ll);
}
else {
#if SIZEOF_INT64_t == SIZEOF_LONG
#if SIZEOF_INT64_T == SIZEOF_LONG
return LONG2NUM(val.i64);
#else
return LL2NUM(val.i64);
Expand All @@ -683,7 +683,7 @@ extract_item_member(const uint8_t *ptr, const rb_memory_view_item_component_t *m
return ULL2NUM(val.ull);
}
else {
#if SIZEOF_UINT64_t == SIZEOF_LONG
#if SIZEOF_UINT64_T == SIZEOF_LONG
return ULONG2NUM(val.u64);
#else
return ULL2NUM(val.u64);
Expand Down
2 changes: 1 addition & 1 deletion ractor_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static inline void
rb_ractor_set_current_ec(rb_ractor_t *cr, rb_execution_context_t *ec)
{
#ifdef RB_THREAD_LOCAL_SPECIFIER
#if __APPLE__
#ifdef __APPLE__
rb_current_ec_set(ec);
#else
ruby_current_ec = ec;
Expand Down
2 changes: 1 addition & 1 deletion random.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ random_init(int argc, VALUE *argv, VALUE obj)
# define USE_DEV_URANDOM 0
#endif

#if HAVE_GETENTROPY
#ifdef HAVE_GETENTROPY
# define MAX_SEED_LEN_PER_READ 256
static int
fill_random_bytes_urandom(void *seed, size_t size)
Expand Down
2 changes: 1 addition & 1 deletion ruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
opt->script_name = rb_str_new_cstr(opt->script);
opt->script = RSTRING_PTR(opt->script_name);

#if _WIN32
#ifdef _WIN32
translit_char_bin(RSTRING_PTR(opt->script_name), '\\', '/');
#elif defined DOSISH
translit_char(RSTRING_PTR(opt->script_name), '\\', '/');
Expand Down
2 changes: 1 addition & 1 deletion signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# include <ucontext.h>
#endif

#if HAVE_PTHREAD_H
#ifdef HAVE_PTHREAD_H
# include <pthread.h>
#endif

Expand Down
4 changes: 2 additions & 2 deletions siphash.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ int_sip_dump(sip_state *state)
int v;

for (v = 0; v < 4; v++) {
#if HAVE_UINT64_T
#ifdef HAVE_UINT64_T
printf("v%d: %" PRIx64 "\n", v, state->v[v]);
#else
printf("v%d: %" PRIx32 "%.8" PRIx32 "\n", v, state->v[v].hi, state->v[v].lo);
Expand Down Expand Up @@ -447,7 +447,7 @@ sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len)
OR_BYTE(4);
case 4:
#if BYTE_ORDER == LITTLE_ENDIAN && UNALIGNED_WORD_ACCESS
#if HAVE_UINT64_T
#ifdef HAVE_UINT64_T
last |= (uint64_t) ((uint32_t *) end)[0];
#else
last.lo |= ((uint32_t *) end)[0];
Expand Down
2 changes: 1 addition & 1 deletion strftime.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#endif
#if defined(TM_IN_SYS_TIME) || !defined(GAWK)
#include <sys/types.h>
#if HAVE_SYS_TIME_H
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion template/sizes.c.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Init_sizeof(void)
% next
% end
% cond = conditions[type]
#if SIZEOF_<%= type.tr_cpp %> != 0<%= " && #{cond}" if cond %>
#if defined(SIZEOF_<%= type.tr_cpp %>) && SIZEOF_<%= type.tr_cpp %> != 0<%= " && #{cond}" if cond %>
DEFINE(<%= type %>, <%= type.tr_cpp %>);
#endif
% end
Expand Down
Loading