Menu

#10 patches for build errors

open
nobody
None
5
2001-11-28
2001-11-28
No

The packages (freedce and dcethreads) will not build
due to the -Werror in the build on Red Hat v7.2 as
shipped. I have some (trivial) patches that fix them.
The dcethreads bug was previously reported, but since
no patch was included with the report, I included it as
well.
The last fix was a Makefile change, as -Werror was
causing the build to fail, reporting a possible
variable clobber by longjump/vfork that didn't look
real to me.

Also, while I'm at it, I can't get the
rpc-internals.pdf file. The server
freedce.sourceforge.net doesn't seem to be up.

Here is the patch for dcethreads:

*** src/pthread_dce.c.orig Wed Nov 28 09:49:47 2001
--- src/pthread_dce.c Wed Nov 28 09:50:39 2001
***************
*** 55,60 ****
--- 55,61 ----

#include <dce/dcethreads_conf.h>
+ #include <stdlib.h> /* for abort() */

#ifndef lint
static const char rcsid[] __attribute__((__unused__))
= "$Id: pthread_dce.c,v 1.1 2001/04/12 20:11:25 wez Exp
$";

Here is the patch for freedce:

*** demos/echo_server/misc.c.orig Wed Nov 28 10:19:24
2001
--- demos/echo_server/misc.c Wed Nov 28 10:20:01 2001
***************
*** 2,7 ****
--- 2,8 ----
#include <string.h>
#include <dce/rpc.h>
#include <dce/dce_error.h>
+ #include <stdlib.h>

void
chk_dce_err(ecode, where, why, fatal)
*** demos/echo_server/echo_server.c.orig Wed Nov 28
10:20:21 2001
--- demos/echo_server/echo_server.c Wed Nov 28 10:20:37
2001
***************
*** 9,14 ****
--- 9,15 ----
#include <stdio.h>
#include <string.h>
#include <signal.h>
+ #include <stdlib.h>
#include <dce/rpc.h>
#include <dce/pthread_exc.h>
#include "echo.h"
*** demos/echo_server/echo_client.c.orig Wed Nov 28
10:20:55 2001
--- demos/echo_server/echo_client.c Wed Nov 28 10:21:10
2001
***************
*** 9,14 ****
--- 9,15 ----
#include <stdio.h>
#include <string.h>
#include <dce/rpc.h>
+ #include <stdlib.h>
#include <dce/pthread_exc.h>
#include "echo.h"
#include <misc.h>
*** ncklib/transport/cn/cncall.c.orig Wed Nov 28
09:57:34 2001
--- ncklib/transport/cn/cncall.c Wed Nov 28 09:59:24
2001
***************
*** 193,199 ****
rpc_iovector_elt_p_t iov_p;
rpc_cn_packet_p_t header_p;
unsigned32 cancel_count = 0;
! rpc_clock_t cancel_timeout;
unsigned32 temp_st;
pthread_t current_thread_id;
boolean resolving_thread;
--- 193,199 ----
rpc_iovector_elt_p_t iov_p;
rpc_cn_packet_p_t header_p;
unsigned32 cancel_count = 0;
! rpc_clock_t cancel_timeout = 0;
unsigned32 temp_st;
pthread_t current_thread_id;
boolean resolving_thread;
*** ncklib/transport/dg/dglsn.c.orig Wed Nov 28
10:00:49 2001
--- ncklib/transport/dg/dglsn.c Wed Nov 28 10:04:01
2001
***************
*** 2729,2735 ****
ready_to_go = rexmit_cnt + (xq->first_unsent ==
NULL ? 0 :
xq->next_fragnum - (signed16)
xq->first_unsent->fragnum);

! xq->blast_size = (ready_to_go <
(unsigned32)blast_size) ? ready_to_go : blast_size;

RPC_DBG_PRINTF(rpc_e_dbg_recv, 5, (
--- 2729,2735 ----
ready_to_go = rexmit_cnt + (xq->first_unsent ==
NULL ? 0 :
xq->next_fragnum - (signed16)
xq->first_unsent->fragnum);

! xq->blast_size = ((unsigned32) ready_to_go <
(unsigned32)blast_size) ? (signed32) ready_to_go :
blast_size;

RPC_DBG_PRINTF(rpc_e_dbg_recv, 5, (
*** rpcd/Makefile.orig Wed Nov 28 10:18:52 2001
--- rpcd/Makefile Wed Nov 28 10:19:00 2001
***************
*** 91,97 ****

dce_includes = -I$(top_srcdir)/include
$(DCETHREADINCLUDES)

! CFLAGS = -g -Wall -W -O -Werror -pipe -DNCK
-D_POSIX_SOURCE=1 -I$(top_srcdir)/ncklib/include
-I$(top_srcdir)/ncklib/include/$(target_os)
INCLUDES = $(dce_includes)

SUFFIXES = .idl
--- 91,97 ----

dce_includes = -I$(top_srcdir)/include
$(DCETHREADINCLUDES)

! CFLAGS = -g -Wall -W -O -pipe -DNCK -D_POSIX_SOURCE=1
-I$(top_srcdir)/ncklib/include
-I$(top_srcdir)/ncklib/include/$(target_os)
INCLUDES = $(dce_includes)

SUFFIXES = .idl

Discussion