[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS shishi/gl
From: |
shishi-commit |
Subject: |
CVS shishi/gl |
Date: |
Mon, 13 Mar 2006 14:42:16 +0100 |
Update of /home/jas/self/public-cvs/shishi/gl
In directory latte:/home/jas/self/src/shishi/gl
Modified Files:
Makefile.am base64.h gc-gnulib.c gc-libgcrypt.c setenv.c
time_r.c time_r.h unsetenv.c
Log Message:
Update.
--- /home/jas/self/public-cvs/shishi/gl/Makefile.am 2006/02/14 11:59:48
1.75
+++ /home/jas/self/public-cvs/shishi/gl/Makefile.am 2006/03/13 13:42:08
1.76
@@ -220,6 +220,18 @@
## end gnulib module timegm
+## begin gnulib module unistd
+
+BUILT_SOURCES += $(UNISTD_H)
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h:
+ echo '/* Empty placeholder for address@hidden */' >$@
+MOSTLYCLEANFILES += unistd.h
+
+## end gnulib module unistd
+
## begin gnulib module vasnprintf
libgnu_la_SOURCES += printf-args.h printf-parse.h vasnprintf.h
--- /home/jas/self/public-cvs/shishi/gl/base64.h 2005/08/10 14:58:09
1.5
+++ /home/jas/self/public-cvs/shishi/gl/base64.h 2006/03/13 13:42:08
1.6
@@ -1,5 +1,5 @@
/* base64.h -- Encode binary data using printable characters.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -20,14 +20,14 @@
# define BASE64_H
/* Get size_t. */
-#include <stddef.h>
+# include <stddef.h>
/* Get bool. */
-#include <stdbool.h>
+# include <stdbool.h>
/* This uses that the expression (n+(k-1))/k means the smallest
integer >= n/k, i.e., the ceiling of n/k. */
-#define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
+# define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
extern bool isbase64 (char ch);
--- /home/jas/self/public-cvs/shishi/gl/gc-gnulib.c 2005/12/13 17:23:33
1.4
+++ /home/jas/self/public-cvs/shishi/gl/gc-gnulib.c 2006/03/13 13:42:08
1.5
@@ -1,5 +1,5 @@
-/* gc-gl-common.c --- Common gnulib internal crypto interface functions
- * Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson
+/* gc-gnulib.c --- Common gnulib internal crypto interface functions
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006 Simon Josefsson
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
@@ -31,11 +31,13 @@
#include <string.h>
/* For randomize. */
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
+#ifdef GC_USE_RANDOM
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# include <errno.h>
+#endif
/* Hashes. */
#ifdef GC_USE_MD2
@@ -80,6 +82,8 @@
return;
}
+#ifdef GC_USE_RANDOM
+
/* Randomness. */
static Gc_rc
@@ -105,6 +109,9 @@
break;
}
+ if (strcmp (device, "no") == 0)
+ return GC_RANDOM_ERROR;
+
fd = open (device, O_RDONLY);
if (fd < 0)
return GC_RANDOM_ERROR;
@@ -152,6 +159,8 @@
return randomize (2, data, datalen);
}
+#endif
+
/* Memory allocation. */
void
--- /home/jas/self/public-cvs/shishi/gl/gc-libgcrypt.c 2005/12/13 17:23:33
1.3
+++ /home/jas/self/public-cvs/shishi/gl/gc-libgcrypt.c 2006/03/13 13:42:08
1.4
@@ -1,5 +1,5 @@
/* gc-libgcrypt.c --- Crypto wrappers around Libgcrypt for GC.
- * Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006 Simon Josefsson
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
@@ -65,6 +65,8 @@
return;
}
+#ifdef GC_USE_RANDOM
+
/* Randomness. */
Gc_rc
@@ -88,6 +90,8 @@
return GC_OK;
}
+#endif
+
/* Memory allocation. */
void
--- /home/jas/self/public-cvs/shishi/gl/setenv.c 2005/05/26 15:07:54
1.7
+++ /home/jas/self/public-cvs/shishi/gl/setenv.c 2006/03/13 13:42:08
1.8
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1995-1999,2000-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2003,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -27,9 +27,7 @@
#include <stdlib.h>
#include <string.h>
-#if _LIBC || HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if !_LIBC
# include "allocsa.h"
--- /home/jas/self/public-cvs/shishi/gl/time_r.c 2005/09/20 09:20:12
1.4
+++ /home/jas/self/public-cvs/shishi/gl/time_r.c 2006/03/13 13:42:08
1.5
@@ -1,6 +1,6 @@
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,18 +44,6 @@
}
-char *
-asctime_r (struct tm const * restrict tm, char * restrict buf)
-{
- return copy_string_result (buf, asctime (tm));
-}
-
-char *
-ctime_r (time_t const *t, char *buf)
-{
- return copy_string_result (buf, ctime (t));
-}
-
struct tm *
gmtime_r (time_t const * restrict t, struct tm * restrict tp)
{
--- /home/jas/self/public-cvs/shishi/gl/time_r.h 2005/08/10 14:58:09
1.3
+++ /home/jas/self/public-cvs/shishi/gl/time_r.h 2006/03/13 13:42:08
1.4
@@ -1,6 +1,6 @@
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 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 General Public License as published by
@@ -27,25 +27,20 @@
#include <time.h>
#if !HAVE_TIME_R_POSIX
-# undef asctime_r
-# undef ctime_r
+
+/* Don't bother with asctime_r and ctime_r, since these functions are
+ not safe (like asctime and ctime, they can overrun their 26-byte
+ output buffers when given outlandish struct tm values), and we
+ don't want to encourage applications to use unsafe functions. Use
+ strftime or even sprintf instead. */
+
# undef gmtime_r
# undef localtime_r
-# define asctime_r rpl_asctime_r
-# define ctime_r rpl_ctime_r
# define gmtime_r rpl_gmtime_r
# define localtime_r rpl_localtime_r
/* See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/asctime.html>. */
-char *asctime_r (struct tm const * restrict, char * restrict);
-
-/* See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/ctime.html>. */
-char *ctime_r (time_t const *, char *);
-
-/* See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/gmtime.html>. */
struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
--- /home/jas/self/public-cvs/shishi/gl/unsetenv.c 2005/05/26 15:07:54
1.5
+++ /home/jas/self/public-cvs/shishi/gl/unsetenv.c 2006/03/13 13:42:08
1.6
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1995-1999,2000-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -29,9 +29,7 @@
#include <stdlib.h>
#include <string.h>
-#if _LIBC || HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if !_LIBC
# define __environ environ
- CVS shishi/gl,
shishi-commit <=