diff options
author | joerg <joerg@FreeBSD.org> | 1997-08-25 05:24:31 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-08-25 05:24:31 +0000 |
commit | a4d82a959aeb47170a0450b2743fa5d8f9890393 (patch) | |
tree | 8b010835302624d3f9bb1e067c62a9e6d81ec37b /lib | |
parent | 4760384ee3898fd9f6ff4352bf2b0b1cae4ec150 (diff) | |
download | FreeBSD-src-a4d82a959aeb47170a0450b2743fa5d8f9890393.zip FreeBSD-src-a4d82a959aeb47170a0450b2743fa5d8f9890393.tar.gz |
Make the MD* header files C++-aware. Also, string arguments are supposed
to be of type `const char *'.
PR: 3291
Submitted by: dima@tejblum.dnttm.rssi.ru (Dmitrij Tejblum)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libmd/md2.h | 8 | ||||
-rw-r--r-- | lib/libmd/md4.h | 8 | ||||
-rw-r--r-- | lib/libmd/mdX.3 | 4 | ||||
-rw-r--r-- | lib/libmd/mdXhl.c | 4 | ||||
-rw-r--r-- | lib/libmd/mddriver.c | 6 |
5 files changed, 20 insertions, 10 deletions
diff --git a/lib/libmd/md2.h b/lib/libmd/md2.h index ecdeaf7..73e8b5a 100644 --- a/lib/libmd/md2.h +++ b/lib/libmd/md2.h @@ -1,5 +1,5 @@ /* MD2.H - header file for MD2C.C - * $Id$ + * $Id: md2.h,v 1.5 1997/02/22 15:07:12 peter Exp $ */ /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All @@ -30,11 +30,15 @@ typedef struct MD2Context { unsigned char buffer[16]; /* input buffer */ } MD2_CTX; +#include <sys/cdefs.h> + +__BEGIN_DECLS void MD2Init(MD2_CTX *); void MD2Update(MD2_CTX *, const unsigned char *, unsigned int); void MD2Final(unsigned char [16], MD2_CTX *); char * MD2End(MD2_CTX *, char *); -char * MD2File(char *, char *); +char * MD2File(const char *, char *); char * MD2Data(const unsigned char *, unsigned int, char *); +__END_DECLS #endif /* _MD2_H_ */ diff --git a/lib/libmd/md4.h b/lib/libmd/md4.h index 5481bbd..10058a8 100644 --- a/lib/libmd/md4.h +++ b/lib/libmd/md4.h @@ -1,5 +1,5 @@ /* MD4.H - header file for MD4C.C - * $Id$ + * $Id: md4.h,v 1.6 1997/02/22 15:07:17 peter Exp $ */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All @@ -32,11 +32,15 @@ typedef struct MD4Context { unsigned char buffer[64]; /* input buffer */ } MD4_CTX; +#include <sys/cdefs.h> + +__BEGIN_DECLS void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const unsigned char *, unsigned int); void MD4Final(unsigned char [16], MD4_CTX *); char * MD4End(MD4_CTX *, char *); -char * MD4File(char *, char *); +char * MD4File(const char *, char *); char * MD4Data(const unsigned char *, unsigned int, char *); +__END_DECLS #endif /* _MD4_H_ */ diff --git a/lib/libmd/mdX.3 b/lib/libmd/mdX.3 index d9539f6..63dc597 100644 --- a/lib/libmd/mdX.3 +++ b/lib/libmd/mdX.3 @@ -6,7 +6,7 @@ .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp .\" ---------------------------------------------------------------------------- .\" -.\" $Id: mdX.3,v 1.9 1997/02/22 15:07:22 peter Exp $ +.\" $Id: mdX.3,v 1.10 1997/03/19 00:52:58 bde Exp $ .\" .Dd October 9, 1996 .Dt MDX 3 @@ -31,7 +31,7 @@ .Ft "char *" .Fn MDXEnd "MDX_CTX *context" "char *buf" .Ft "char *" -.Fn MDXFile "char *filename" "char *buf" +.Fn MDXFile "const char *filename" "char *buf" .Ft "char *" .Fn MDXData "const unsigned char *data" "unsigned int len" "char *buf" .Sh DESCRIPTION diff --git a/lib/libmd/mdXhl.c b/lib/libmd/mdXhl.c index e0e9198..460d27e 100644 --- a/lib/libmd/mdXhl.c +++ b/lib/libmd/mdXhl.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: mdXhl.c,v 1.10 1997/02/22 15:07:23 peter Exp $ * */ @@ -41,7 +41,7 @@ MDXEnd(MDX_CTX *ctx, char *buf) } char * -MDXFile (char *filename, char *buf) +MDXFile (const char *filename, char *buf) { unsigned char buffer[BUFSIZ]; MDX_CTX ctx; diff --git a/lib/libmd/mddriver.c b/lib/libmd/mddriver.c index 633442b..82a4757 100644 --- a/lib/libmd/mddriver.c +++ b/lib/libmd/mddriver.c @@ -1,5 +1,5 @@ /* MDDRIVER.C - test driver for MD2, MD4 and MD5 - * $Id$ + * $Id: mddriver.c,v 1.3 1997/02/22 15:07:24 peter Exp $ */ /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All @@ -18,9 +18,11 @@ defined with C compiler flags. */ #ifndef MD -#define MD MD5 +#define MD 5 #endif +#include <sys/types.h> + #include <stdio.h> #include <time.h> #include <string.h> |