mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Sat Jun 26 12:15:59 CEST 1999 Werner Koch
This commit is contained in:
parent
1423b4239b
commit
080c9ca49f
39 changed files with 2651 additions and 1912 deletions
|
@ -1,3 +1,16 @@
|
|||
Sat Jun 26 12:15:59 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
|
||||
* dotlock.c (create_dotlock): s/uts/utsbuf/ cause there an Amdahl
|
||||
system with the name UTS (Dave Dykstra).
|
||||
|
||||
* secmem.c (DEFAULT_POOLSIZE): Doubled the size.
|
||||
|
||||
Fri Jun 18 00:18:02 CEST 1999 Michael Roth <mroth@nessie.de>
|
||||
|
||||
* iobuf.c: file_filter() Detection of EOF on terminals
|
||||
improved/fixed (see Bug #21).
|
||||
|
||||
Mon Jun 14 21:18:54 CEST 1999 Michael Roth <mroth@nessie.de>
|
||||
|
||||
* ttyio.c: tty_no_terminal() new.
|
||||
|
|
|
@ -74,7 +74,7 @@ create_dotlock( const char *file_to_lock )
|
|||
int fd = -1;
|
||||
char pidstr[16];
|
||||
#ifndef HAVE_DOSISH_SYSTEM
|
||||
struct utsname uts;
|
||||
struct utsname utsbuf;
|
||||
#endif
|
||||
const char *nodename;
|
||||
const char *dirpart;
|
||||
|
@ -93,10 +93,10 @@ create_dotlock( const char *file_to_lock )
|
|||
/* fixme: add the hostname to the second line (FQDN or IP addr?) */
|
||||
|
||||
/* create a temporary file */
|
||||
if( uname( &uts ) )
|
||||
if( uname( &utsbuf ) )
|
||||
nodename = "unknown";
|
||||
else
|
||||
nodename = uts.nodename;
|
||||
nodename = utsbuf.nodename;
|
||||
|
||||
if( !(dirpart = strrchr( file_to_lock, '/' )) ) {
|
||||
dirpart = ".";
|
||||
|
|
24
util/iobuf.c
24
util/iobuf.c
|
@ -92,16 +92,22 @@ file_filter(void *opaque, int control, IOBUF chain, byte *buf, size_t *ret_len)
|
|||
|
||||
if( control == IOBUFCTRL_UNDERFLOW ) {
|
||||
assert( size ); /* need a buffer */
|
||||
clearerr( fp );
|
||||
nbytes = fread( buf, 1, size, fp );
|
||||
if( feof(fp) && !nbytes )
|
||||
rc = -1; /* okay: we can return EOF now. */
|
||||
else if( ferror(fp) && errno != EPIPE ) {
|
||||
log_error("%s: read error: %s\n",
|
||||
a->fname, strerror(errno));
|
||||
rc = G10ERR_READ_FILE;
|
||||
if ( feof(fp)) { /* On terminals you could easiely read as many EOFs as you call */
|
||||
rc = -1; /* fread() or fgetc() repeatly. Every call will block until you press */
|
||||
*ret_len = 0; /* CTRL-D. So we catch this case before we call fread() again. */
|
||||
}
|
||||
else {
|
||||
clearerr( fp );
|
||||
nbytes = fread( buf, 1, size, fp );
|
||||
if( feof(fp) && !nbytes )
|
||||
rc = -1; /* okay: we can return EOF now. */
|
||||
else if( ferror(fp) && errno != EPIPE ) {
|
||||
log_error("%s: read error: %s\n",
|
||||
a->fname, strerror(errno));
|
||||
rc = G10ERR_READ_FILE;
|
||||
}
|
||||
*ret_len = nbytes;
|
||||
}
|
||||
*ret_len = nbytes;
|
||||
}
|
||||
else if( control == IOBUFCTRL_FLUSH ) {
|
||||
if( size ) {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
|
||||
#define DEFAULT_POOLSIZE 8196
|
||||
#define DEFAULT_POOLSIZE 16384
|
||||
|
||||
typedef struct memblock_struct MEMBLOCK;
|
||||
struct memblock_struct {
|
||||
|
@ -184,7 +184,7 @@ init_pool( size_t n)
|
|||
static void
|
||||
compress_pool(void)
|
||||
{
|
||||
|
||||
/* fixme: we really should do this */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -290,6 +290,7 @@ secmem_malloc( size_t size )
|
|||
max_alloced = cur_alloced;
|
||||
if( cur_blocks > max_blocks )
|
||||
max_blocks = cur_blocks;
|
||||
|
||||
return &mb->u.aligned.c;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue