$Log$
+Revision 211.12 2000/04/06 20:37:01 nbryant
+* solaris cleanups and warning fixes
+
Revision 211.11 2000/03/31 03:48:52 ajc
* text_to_server() now behaves the way web users expect text entry to work.
Soft linebreaks are soft, hard linebreaks are hard. No indentation.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
dnl Checks for programs.
AC_PROG_CC
-test "$GCC" = yes && CFLAGS="$CFLAGS -Wall"
+
+dnl Configure compiler flags for GCC
+if test "$GCC" = yes; then
+ case "$host" in
+ *-*-solaris*)
+ CFLAGS="$CFLAGS -Wall -Wno-char-subscripts"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -Wall"
+ ;;
+ esac
+fi
+
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
*/
int uds_connectsock(char *sockpath)
{
- struct sockaddr_un sun;
+ struct sockaddr_un addr;
int s;
- memset(&sun, 0, sizeof(sun));
- sun.sun_family = AF_UNIX;
- strncpy(sun.sun_path, sockpath, sizeof sun.sun_path);
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+ strncpy(addr.sun_path, sockpath, sizeof addr.sun_path);
s = socket(AF_UNIX, SOCK_STREAM, 0);
if (s < 0) {
return(-1);
}
- if (connect(s, (struct sockaddr *) &sun, sizeof(sun)) < 0) {
+ if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
fprintf(stderr, "can't connect: %s\n",
strerror(errno));
return(-1);
struct sockaddr_in sin;
int s;
- bzero((char *) &sin, sizeof(sin));
+ memcpy(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
pse = getservbyname(service, "tcp");
}
phe = gethostbyname(host);
if (phe) {
- bcopy(phe->h_addr, (char *) &sin.sin_addr, phe->h_length);
+ memcpy(&sin.sin_addr, phe->h_addr, phe->h_length);
} else if ((sin.sin_addr.s_addr = inet_addr(host)) == INADDR_NONE) {
fprintf(stderr, "Can't get %s host entry: %s\n",
host, strerror(errno));