portability


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@94 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index c65d296..9b8c1aa 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 baf3e42..7579349 100644
--- a/skeletons/OBJECT_IDENTIFIER.c
+++ b/skeletons/OBJECT_IDENTIFIER.c
@@ -191,7 +191,7 @@
 			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 @@
 	/* 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);
 }