You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ha...@hyperreal.com> on 1995/08/28 19:08:03 UTC
Patches for 0.8.8 to 0.8.11 (fwd) {cosmetic}
Forwarded message:
> From weingart@austin.BrandonU.CA Sun Aug 27 17:50:16 1995
> Date: Sun, 27 Aug 1995 19:47:54 -0500
> From: Tobias Weingartner <we...@austin.BrandonU.CA>
> Subject: Patches for 0.8.8 to 0.8.11
> To: apache-bugs@apache.org
> Cc: weingart@austin.BrandonU.CA
> Message-id: <22...@austin>
> X-Envelope-to: apache-bugs@apache.org
> Content-transfer-encoding: 7BIT
>
>
> Here are a couple of patches, which I use. One is to get rid of using
> gethostname() on SVR4 (SYSV) boxes, and use utsname() instead. The others
> are mostly cosmetic changes, so that gcc -Wall does not complain anymore.
>
> Hope these make it through ok. Please let me know what you think.
>
> -----------------------------------------------------------------------
> *** 1.1 1995/08/28 00:33:53
> --- conf.h 1995/08/28 00:38:56
> ***************
> *** 302,307 ****
> --- 302,311 ----
> #include <fcntl.h>
> #include <limits.h>
> #include <memory.h>
> + #if defined(SVR4) || defined(SYSV) || defined(SOLARIS2)
> + #include <sys/utsname.h>
> + #include <crypt.h>
> + #endif
>
> #ifndef LOGNAME_MAX
> #define LOGNAME_MAX 25
> *** 1.1 1995/08/28 00:33:53
> --- mod_access.c 1995/08/28 00:44:19
> ***************
> *** 68,73 ****
> --- 68,74 ----
>
> #include "httpd.h"
> #include "http_config.h"
> + #include "http_log.h"
>
> typedef struct {
> char *from;
> *** 1.1 1995/08/28 00:33:53
> --- mod_negotiation.c 1995/08/28 00:41:41
> ***************
> *** 847,853 ****
> var_rec *var_recs = (var_rec*)neg->avail_vars->elts;
> int i;
> int found_any = 0;
> ! neg_dir_config *conf;
> int naccept = neg->accept_langs->nelts;
>
> if (naccept == 0)
> --- 847,853 ----
> var_rec *var_recs = (var_rec*)neg->avail_vars->elts;
> int i;
> int found_any = 0;
> ! neg_dir_config *conf = NULL;
> int naccept = neg->accept_langs->nelts;
>
> if (naccept == 0)
> *** 1.1 1995/08/28 00:33:53
> --- util.c 1995/08/28 00:36:40
> ***************
> *** 843,851 ****
> char str[128];
> int len = 128;
> char *server_hostname;
> -
> struct hostent *p;
> gethostname(str, len);
> if((!(p=gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) {
> fprintf(stderr,"httpd: cannot determine local host name.\n");
> fprintf(stderr,"Use ServerName to set it manually.\n");
> --- 843,862 ----
> char str[128];
> int len = 128;
> char *server_hostname;
> struct hostent *p;
> +
> + #if defined(SVR4) || defined(SYSV) || defined(SOLARIS2)
> + struct utsname n;
> + if(uname(&n) < 0) {
> + fprintf(stderr, "httpd: uname(2) failed.\n");
> + fprintf(stderr, "Use ServerName to set nodename manually.\n");
> + exit(1);
> + }else{
> + strncpy(str, n.nodename, len);
> + }
> + #else
> gethostname(str, len);
> + #endif
> if((!(p=gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) {
> fprintf(stderr,"httpd: cannot determine local host name.\n");
> fprintf(stderr,"Use ServerName to set it manually.\n");
> -----------------------------------------------------------------------
>
> --Toby.
> *----------------------------------------------------------------------------*
> | Tobias Weingartner | Email: weingart@BrandonU.Ca | Need a Unix sys-admin? |
> | Box 27, Beulah, MB |-----------------------------| Send E-Mail for resume, |
> | R0M 0B0, Canada | Unix Guru, Admin, Sys-Prgmr | and other details... |
> |----------------------------------------------------------------------------|
> | %SYSTEM-F-ANARCHISM, The operating system has been overthrown |
> *----------------------------------------------------------------------------*
>