Mercurial > ecos
changeset 379:c1f41b50396c
* include/crc.h: Add extern definitions.
| author | jlarmour |
|---|---|
| date | Fri, 18 Oct 2002 02:14:43 +0000 |
| parents | 7e6966d143c0 |
| children | 6279a5f6c86b |
| files | packages/services/crc/current/ChangeLog packages/services/crc/current/include/crc.h |
| diffstat | 2 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/services/crc/current/ChangeLog +++ b/packages/services/crc/current/ChangeLog @@ -1,3 +1,7 @@ +2002-10-18 Jonathan Larmour <jifl@eCosCentric.com> + + * include/crc.h: Add extern definitions. + 2002-10-11 Andrew Lunn <andrew.lunn@ascom.ch> * src/crc32.c (cyg_ether_crc32):
--- a/packages/services/crc/current/include/crc.h +++ b/packages/services/crc/current/include/crc.h @@ -55,36 +55,44 @@ #ifndef _SERVICES_CRC_CRC_H_ #define _SERVICES_CRC_CRC_H_ +#ifndef __externC +# ifdef __cplusplus +# define __externC extern "C" +# else +# define __externC extern +# endif +#endif + // Compute a CRC, using the POSIX 1003 definition -unsigned long +__externC unsigned long cyg_posix_crc32(unsigned char *s, int len); // Gary S. Brown's 32 bit CRC -unsigned long +__externC unsigned long cyg_crc32(unsigned char *s, int len); // Gary S. Brown's 32 bit CRC, but accumulate the result from a // previous CRC calculation -unsigned long +__externC unsigned long cyg_crc32_accumulate(unsigned long crc, unsigned char *s, int len); // Ethernet FCS Algorithm -unsigned long +__externC unsigned long cyg_ether_crc32(unsigned char *s, int len); // Ethernet FCS algorithm, but accumulate the result from a previous // CRC calculation. -unsigned long +__externC unsigned long cyg_ether_crc32_accumulate(unsigned long crc, unsigned char *s, int len); // 16 bit CRC with polynomial x^16+x^12+x^5+1 -unsigned short +__externC unsigned short cyg_crc16(unsigned char *s, int len); #endif // _SERVICES_CRC_CRC_H_
