mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Applied patch from Peter Rienstra for HP-UX 64
SVN revision: 1885
This commit is contained in:
parent
118af2854e
commit
ba028e1805
20
src/elogd.c
20
src/elogd.c
@ -567,7 +567,7 @@ int my_read(int fh, void *buffer, unsigned int bytes)
|
|||||||
int i, n = 0;
|
int i, n = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
i = read(fh, buffer + n, bytes - n);
|
i = read(fh, (char *)buffer + n, bytes - n);
|
||||||
|
|
||||||
/* don't return if an alarm signal was cought */
|
/* don't return if an alarm signal was cought */
|
||||||
if (i == -1 && errno == EINTR)
|
if (i == -1 && errno == EINTR)
|
||||||
@ -646,6 +646,10 @@ void *xmalloc(size_t bytes)
|
|||||||
{
|
{
|
||||||
char *temp;
|
char *temp;
|
||||||
|
|
||||||
|
/* Align buffer on 4 byte boundery for HP UX and other 64 bit systems to prevent Bus error (core dump) */
|
||||||
|
if (bytes & 3)
|
||||||
|
bytes += 4 - (bytes & 3);
|
||||||
|
|
||||||
temp = (char *) malloc(bytes + 12);
|
temp = (char *) malloc(bytes + 12);
|
||||||
if (temp == 0)
|
if (temp == 0)
|
||||||
memory_error_and_abort("xmalloc");
|
memory_error_and_abort("xmalloc");
|
||||||
@ -662,6 +666,10 @@ void *xcalloc(size_t count, size_t bytes)
|
|||||||
{
|
{
|
||||||
char *temp;
|
char *temp;
|
||||||
|
|
||||||
|
/* Align buffer on 4 byte boundery for HP UX and other 64 bit systems to prevent Bus error (core dump) */
|
||||||
|
if (bytes & 3)
|
||||||
|
bytes += 4 - (bytes & 3);
|
||||||
|
|
||||||
temp = (char *) malloc(count * bytes + 12);
|
temp = (char *) malloc(count * bytes + 12);
|
||||||
if (temp == 0)
|
if (temp == 0)
|
||||||
memory_error_and_abort("xcalloc");
|
memory_error_and_abort("xcalloc");
|
||||||
@ -680,6 +688,10 @@ void *xrealloc(void *pointer, size_t bytes)
|
|||||||
char *temp;
|
char *temp;
|
||||||
int old_size;
|
int old_size;
|
||||||
|
|
||||||
|
/* Align buffer on 4 byte boundery for HP UX and other 64 bit systems to prevent Bus error (core dump) */
|
||||||
|
if (bytes & 3)
|
||||||
|
bytes += 4 - (bytes & 3);
|
||||||
|
|
||||||
if (pointer == NULL)
|
if (pointer == NULL)
|
||||||
return xmalloc(bytes);
|
return xmalloc(bytes);
|
||||||
|
|
||||||
@ -23344,7 +23356,7 @@ void show_top_selection_page()
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
void show_selection_page()
|
void show_selection_page(void)
|
||||||
{
|
{
|
||||||
int i, j, expand_all, show_title;
|
int i, j, expand_all, show_title;
|
||||||
char str[10000], file_name[256];
|
char str[10000], file_name[256];
|
||||||
@ -23975,7 +23987,7 @@ void interprete(char *lbook, char *path)
|
|||||||
/* if no logbook given, display logbook selection page */
|
/* if no logbook given, display logbook selection page */
|
||||||
if (!logbook[0] && !path[0]) {
|
if (!logbook[0] && !path[0]) {
|
||||||
if (n > 1) {
|
if (n > 1) {
|
||||||
show_selection_page(NULL);
|
show_selection_page();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24285,7 +24297,7 @@ void interprete(char *lbook, char *path)
|
|||||||
|
|
||||||
/* from here on, logbook must be valid */
|
/* from here on, logbook must be valid */
|
||||||
if (!logbook[0]) {
|
if (!logbook[0]) {
|
||||||
show_selection_page(NULL);
|
show_selection_page();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user