From 74057d535e40b19def01867cfb10ddd14a30db1d Mon Sep 17 00:00:00 2001 From: Lev Walkin <vlm@lionet.info> Date: Wed, 11 Aug 2004 09:17:15 +0000 Subject: [PATCH] portability --- skeletons/GeneralizedTime.c | 1 - skeletons/OBJECT_IDENTIFIER.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c index c65d2960..9b8c1aa1 100644 --- a/skeletons/GeneralizedTime.c +++ b/skeletons/GeneralizedTime.c @@ -2,7 +2,6 @@ * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ -#define __USE_BSD /* To enable tm_gmtoff in glibc */ #include <GeneralizedTime.h> #include <time.h> #include <errno.h> diff --git a/skeletons/OBJECT_IDENTIFIER.c b/skeletons/OBJECT_IDENTIFIER.c index baf3e423..7579349f 100644 --- a/skeletons/OBJECT_IDENTIFIER.c +++ b/skeletons/OBJECT_IDENTIFIER.c @@ -191,7 +191,7 @@ OBJECT_IDENTIFIER_get_single_arc(uint8_t *arcbuf, unsigned int arclen, signed in int v = add + *(unsigned char *)rvbuf; if(v & (-1 << CHAR_BIT)) { *(unsigned char *)rvbuf - = v + (1 << CHAR_BIT); + = (unsigned char)(v + (1 << CHAR_BIT)); add = -1; } else { *(unsigned char *)rvbuf = v; @@ -223,7 +223,7 @@ OBJECT_IDENTIFIER_print_arc(uint8_t *arcbuf, int arclen, int add, /* Fill the scratch buffer in reverse. */ p = scratch + sizeof(scratch); for(; accum; accum /= 10) - *(--p) = (accum % 10) + 0x30; + *(--p) = (char)(accum % 10) + 0x30; return cb(p, sizeof(scratch) - (p - scratch), app_key); } -- GitLab