2003-11-11  Theodore A. Roth  <address@hidden>

	* include/avr/crc16.h: Use inttypes.h defined types to allow use
	with -mint8.
	* include/avr/delay.h: Ditto.
	[Submitted by Tomas Vanek <address@hidden>]

Index: include/avr/crc16.h
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/include/avr/crc16.h,v
retrieving revision 1.3
diff -u -p -r1.3 crc16.h
--- include/avr/crc16.h	11 Nov 2003 17:46:10 -0000	1.3
+++ include/avr/crc16.h	11 Nov 2003 18:34:40 -0000
@@ -28,6 +28,8 @@
 #ifndef _AVR_CRC16_H_
 #define _AVR_CRC16_H_
 
+#include <inttypes.h>
+
 /** \defgroup avr_crc CRC Computations
     \code#include <avr/crc16.h>\endcode
 
@@ -57,11 +59,11 @@
 
     This CRC is normally used in disk-drive controllers. */
 
-static inline unsigned int
-_crc16_update(unsigned int __crc, unsigned char __data)
+static inline uint16_t
+_crc16_update(uint16_t __crc, uint8_t __data)
 {
-	unsigned char __tmp;
-	unsigned int __ret;
+	uint8_t __tmp;
+	uint16_t __ret;
 
 	__asm__ (
 		"eor %A0,%2" "\n\t"
@@ -123,12 +125,12 @@ _crc16_update(unsigned int __crc, unsign
     }
     \endcode */
 
-static inline unsigned int
-_crc_xmodem_update(unsigned int __crc, unsigned char __data)
+static inline uint16_t
+_crc_xmodem_update(uint16_t __crc, uint8_t __data)
 {
-    unsigned int __ret;         /* %B0:%A0 (alias for __crc) */
-    unsigned char __tmp1;       /* %1 */
-    unsigned char __tmp2;       /* %2 */
+    uint16_t __ret;             /* %B0:%A0 (alias for __crc) */
+    uint8_t __tmp1;             /* %1 */
+    uint8_t __tmp2;             /* %2 */
                                 /* %3  __data */
 
     __asm__ (
Index: include/avr/delay.h
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/include/avr/delay.h,v
retrieving revision 1.2
diff -u -p -r1.2 delay.h
--- include/avr/delay.h	12 Dec 2002 11:41:01 -0000	1.2
+++ include/avr/delay.h	11 Nov 2003 18:34:40 -0000
@@ -32,9 +32,11 @@
 #ifndef _AVR_DELAY_H_
 #define _AVR_DELAY_H_ 1
 
+#include <inttypes.h>
+
 /* 8-bit count, 3 cycles/loop */
 static inline void
-_delay_loop_1(unsigned char __count)
+_delay_loop_1(uint8_t __count)
 {
 	asm volatile (
 		"1: dec %0" "\n\t"
@@ -46,7 +48,7 @@ _delay_loop_1(unsigned char __count)
 
 /* 16-bit count, 4 cycles/loop */
 static inline void
-_delay_loop_2(unsigned int __count)
+_delay_loop_2(uint16_t __count)
 {
 	asm volatile (
 		"1: sbiw %0,1" "\n\t"