[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS gsasl/lib/gl
From: |
gsasl-commit |
Subject: |
CVS gsasl/lib/gl |
Date: |
Tue, 17 Jan 2006 18:42:58 +0100 |
Update of /home/cvs/gsasl/lib/gl
In directory dopio:/tmp/cvs-serv27248/lib/gl
Modified Files:
Makefile.am base64.c md5.c md5.h stdint_.h
Log Message:
Update.
--- /home/cvs/gsasl/lib/gl/Makefile.am 2005/10/23 17:41:43 1.31
+++ /home/cvs/gsasl/lib/gl/Makefile.am 2006/01/17 17:41:58 1.32
@@ -16,6 +16,7 @@
libgl_la_SOURCES =
libgl_la_LIBADD = @LTLIBOBJS@
+noinst_HEADERS =
EXTRA_DIST =
BUILT_SOURCES =
SUFFIXES =
--- /home/cvs/gsasl/lib/gl/base64.c 2005/09/19 16:01:04 1.15
+++ /home/cvs/gsasl/lib/gl/base64.c 2006/01/17 17:41:58 1.16
@@ -1,5 +1,5 @@
/* base64.c -- Encode binary data using printable characters.
- Copyright (C) 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -50,6 +50,9 @@
/* Get malloc. */
#include <stdlib.h>
+/* Get UCHAR_MAX. */
+#include <limits.h>
+
/* C89 compliant way to cast 'char' to 'unsigned char'. */
static inline unsigned char
to_uchar (char ch)
@@ -278,10 +281,16 @@
B64 (252), B64 (253), B64 (254), B64 (255)
};
+#if UCHAR_MAX == 255
+# define uchar_in_range(c) true
+#else
+# define uchar_in_range(c) ((c) <= 255)
+#endif
+
bool
isbase64 (char ch)
{
- return to_uchar (ch) <= 255 && 0 <= b64[to_uchar (ch)];
+ return uchar_in_range (to_uchar (ch)) && 0 <= b64[to_uchar (ch)];
}
/* Decode base64 encoded input array IN of length INLEN to output
--- /home/cvs/gsasl/lib/gl/md5.c 2005/11/30 15:22:49 1.4
+++ /home/cvs/gsasl/lib/gl/md5.c 2006/01/17 17:41:58 1.5
@@ -1,6 +1,6 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995,1996,1997,1999,2000,2001,2005
+ Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -86,7 +86,7 @@
must be in little endian byte order.
IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
+ aligned for a 32-bit value. */
void *
md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
@@ -102,7 +102,7 @@
prolog according to the standard and write the result to RESBUF.
IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
+ aligned for a 32-bit value. */
void *
md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
{
@@ -245,14 +245,8 @@
if (len >= 64)
{
#if !_STRING_ARCH_unaligned
-/* To check alignment gcc has an appropriate operator. Other
- compilers don't. */
-# if __GNUC__ >= 2
-# define UNALIGNED_P(p) (((uintptr_t) p) % __alignof__ (uint32_t) != 0)
-# else
-# define alignof(type) offsetof (struct { char c; type x; }, x)
-# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
-# endif
+# define alignof(type) offsetof (struct { char c; type x; }, x)
+# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
{
@@ -382,7 +376,7 @@
argument specifying the function to use. */
#undef OP
#define OP(f, a, b, c, d, k, s, T) \
- do \
+ do \
{ \
a += f (b, c, d) + correct_words[k] + T; \
CYCLIC (a, s); \
--- /home/cvs/gsasl/lib/gl/md5.h 2005/10/23 14:49:14 1.3
+++ /home/cvs/gsasl/lib/gl/md5.h 2006/01/17 17:41:58 1.4
@@ -1,6 +1,6 @@
/* Declaration of functions and data types used for MD5 sum computing
library functions.
- Copyright (C) 1995-1997,1999,2000,2001,2004,2005
+ Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -44,12 +44,6 @@
# endif
#endif
-#ifndef __attribute__
-# if ! __GNUC_PREREQ (2,8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-#endif
-
#ifndef _LIBC
# define __md5_buffer md5_buffer
# define __md5_finish_ctx md5_finish_ctx
--- /home/cvs/gsasl/lib/gl/stdint_.h 2006/01/10 15:48:01 1.3
+++ /home/cvs/gsasl/lib/gl/stdint_.h 2006/01/17 17:41:58 1.4
@@ -245,7 +245,7 @@
#define SIG_ATOMIC_MAX 127
#ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */
-# define SIZE_MAX (size_t)~(size_t)0)
+# define SIZE_MAX ((size_t)~(size_t)0)
#endif
/* wchar_t limits already defined in <stddef.h>. */