From 5f59007052703a1a7900869faae027ffbd13dc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Mon, 16 Dec 2002 22:07:02 +0000 Subject: [PATCH] Solaris RPC portability fix git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1311 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- configure.ac | 2 +- rpcrig/Makefile.am | 3 +++ rpcrig/rpcrig_backend.c | 5 ++++- rpcrig/rpcrigd.c | 7 ++++--- rpcrot/Makefile.am | 3 +++ rpcrot/rpcrot_backend.c | 6 +++++- rpcrot/rpcrotd.c | 7 ++++--- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 6eed580fc..dc96d5535 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([alloca.h argz.h malloc.h memory.h string.h strings.h]) -AC_CHECK_HEADERS([stdlib.h values.h rpc/rpc.h net/errno.h]) +AC_CHECK_HEADERS([stdlib.h values.h rpc/rpc.h rpc/rpcent.h net/errno.h]) AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h sys/param.h unistd.h getopt.h errno.h]) AC_CHECK_HEADERS([sys/ioccom.h linux/ppdev.h sgtty.h term.h termio.h termios.h]) AC_CHECK_HEADERS([windows.h winioctl.h winbase.h]) diff --git a/rpcrig/Makefile.am b/rpcrig/Makefile.am index fd202a1d9..e68e66935 100644 --- a/rpcrig/Makefile.am +++ b/rpcrig/Makefile.am @@ -10,6 +10,9 @@ DEPENDENCIES = $(top_builddir)/src/libhamlib.la BUILT_SOURCES = rpcrig_xdr.c rpcrig_svc.c rpcrig_xdr_lt.c rpcrig_clnt.c rpcrig.h DISTCLEANFILES = rpcrig_xdr.c rpcrig_svc.c rpcrig_xdr_lt.c rpcrig_clnt.c rpcrig.h +# needed for backward compatibility on Solaris. +AM_CFLAGS = $(CFLAGS) -DPORTMAP + # The RPC server sbin_PROGRAMS = rpc.rigd rpc_rigd_DEPENDENCIES = $(DEPENDENCIES) @BACKENDEPS@ diff --git a/rpcrig/rpcrig_backend.c b/rpcrig/rpcrig_backend.c index 0240c1dc2..fa4905a3c 100644 --- a/rpcrig/rpcrig_backend.c +++ b/rpcrig/rpcrig_backend.c @@ -2,7 +2,7 @@ * Hamlib RPC backend - main file * Copyright (c) 2001,2002 by Stephane Fillod * - * $Id: rpcrig_backend.c,v 1.10 2002-09-13 06:58:55 fillods Exp $ + * $Id: rpcrig_backend.c,v 1.11 2002-12-16 22:06:50 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -42,6 +42,9 @@ #include #include +#ifdef HAVE_RPC_RPCENT_H +#include +#endif #include "rpcrig.h" #include "rpcrig_backend.h" diff --git a/rpcrig/rpcrigd.c b/rpcrig/rpcrigd.c index dc8128b13..c5fd359c0 100644 --- a/rpcrig/rpcrigd.c +++ b/rpcrig/rpcrigd.c @@ -4,7 +4,7 @@ * This program let programs control a radio through * the mean of RPC services using Hamlib. * - * $Id: rpcrigd.c,v 1.5 2002-09-13 06:58:55 fillods Exp $ + * $Id: rpcrigd.c,v 1.6 2002-12-16 22:06:54 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -37,9 +37,10 @@ #include #include #include +#ifdef HAVE_RPC_RPCENT_H +#include +#endif - -/* TODO: autoconf should check for getopt support, include libs otherwise */ #include #include diff --git a/rpcrot/Makefile.am b/rpcrot/Makefile.am index 333a958dc..d98cabee0 100644 --- a/rpcrot/Makefile.am +++ b/rpcrot/Makefile.am @@ -10,6 +10,9 @@ DEPENDENCIES = $(top_builddir)/src/libhamlib.la BUILT_SOURCES = rpcrot_xdr.c rpcrot_svc.c rpcrot_xdr_lt.c rpcrot_clnt.c rpcrot.h DISTCLEANFILES = rpcrot_xdr.c rpcrot_svc.c rpcrot_xdr_lt.c rpcrot_clnt.c rpcrot.h +# needed for backward compatibility on Solaris. +AM_CFLAGS = $(CFLAGS) -DPORTMAP + # The RPC server sbin_PROGRAMS = rpc.rotd rpc_rotd_DEPENDENCIES = $(DEPENDENCIES) @ROT_BACKENDEPS@ diff --git a/rpcrot/rpcrot_backend.c b/rpcrot/rpcrot_backend.c index 8ece636f2..d49a5bcef 100644 --- a/rpcrot/rpcrot_backend.c +++ b/rpcrot/rpcrot_backend.c @@ -3,7 +3,7 @@ * Copyright (c) 2001,2002 by Stephane Fillod * Contributed by Francois Retief * - * $Id: rpcrot_backend.c,v 1.4 2002-09-13 06:59:54 fillods Exp $ + * $Id: rpcrot_backend.c,v 1.5 2002-12-16 22:07:00 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -43,6 +43,10 @@ #include #include +#ifdef HAVE_RPC_RPCENT_H +#include +#endif + #include "rpcrot.h" #include "rpcrot_backend.h" diff --git a/rpcrot/rpcrotd.c b/rpcrot/rpcrotd.c index 067f2d9f2..ed6f58453 100644 --- a/rpcrot/rpcrotd.c +++ b/rpcrot/rpcrotd.c @@ -4,7 +4,7 @@ * This program let programs control a rotator through * the mean of RPC services using Hamlib. * - * $Id: rpcrotd.c,v 1.3 2002-10-30 23:39:34 fillods Exp $ + * $Id: rpcrotd.c,v 1.4 2002-12-16 22:07:02 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -37,9 +37,10 @@ #include #include #include +#ifdef HAVE_RPC_RPCENT_H +#include +#endif - -/* TODO: autoconf should check for getopt support, include libs otherwise */ #include #include