OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   20-Sep-2007 09:01:58
  Branch: HEAD                             Handle: 2007092008015700

  Modified files:
    openpkg-src/ssmtp       ssmtp.patch ssmtp.spec

  Log:
    work around suse10.1 "conflicting types" build error and fix various
    amd64 "cast pointer to integer" warnings

  Summary:
    Revision    Changes     Path
    1.10        +194 -0     openpkg-src/ssmtp/ssmtp.patch
    1.68        +1  -1      openpkg-src/ssmtp/ssmtp.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/ssmtp/ssmtp.patch
  ============================================================================
  $ cvs diff -u -r1.9 -r1.10 ssmtp.patch
  --- openpkg-src/ssmtp/ssmtp.patch     19 Sep 2007 11:50:13 -0000      1.9
  +++ openpkg-src/ssmtp/ssmtp.patch     20 Sep 2007 07:01:57 -0000      1.10
  @@ -226,3 +226,197 @@
   +Matt Ryan ([EMAIL PROTECTED]), Hugo Haas ([EMAIL PROTECTED]), Christoph 
Lameter ([EMAIL PROTECTED])
   +and Dave Collier-Brown ([EMAIL PROTECTED]).
   +Reuben Thomas ([EMAIL PROTECTED]) wrote the man page.
  +
  +workaround amd64-suse10.1 error: conflicting types for 'basename'
  +fix amd64-suse10.1 warnings: cast from pointer to integer of different size
  +Index: ssmtp.c
  +--- ssmtp.c.orig     2007-09-20 08:27:18.000000000 +0200
  ++++ ssmtp.c  2007-09-20 08:45:24.000000000 +0200
  +@@ -40,6 +40,9 @@
  + #endif
  + #include "ssmtp.h"
  + 
  ++#ifndef NUL
  ++#define NUL '\0'
  ++#endif
  + 
  + bool_t have_date = False;
  + bool_t have_from = False;
  +@@ -56,20 +59,20 @@
  + 
  + #define ARPADATE_LENGTH 32          /* Current date in RFC format */
  + char arpadate[ARPADATE_LENGTH];
  +-char *auth_user = (char)NULL;
  +-char *auth_pass = (char)NULL;
  +-char *auth_method = (char)NULL;             /* Mechanism for SMTP 
authentication */
  +-char *mail_domain = (char)NULL;
  +-char *from = (char)NULL;            /* Use this as the From: address */
  ++char *auth_user = (char *)NULL;
  ++char *auth_pass = (char *)NULL;
  ++char *auth_method = (char *)NULL;           /* Mechanism for SMTP 
authentication */
  ++char *mail_domain = (char *)NULL;
  ++char *from = (char *)NULL;          /* Use this as the From: address */
  + char hostname[MAXHOSTNAMELEN] = "localhost";
  + char *mailhost = "mailhub";
  +-char *minus_f = (char)NULL;
  +-char *minus_F = (char)NULL;
  ++char *minus_f = (char *)NULL;
  ++char *minus_F = (char *)NULL;
  + char *gecos;
  +-char *prog = (char)NULL;
  ++char *prog = (char *)NULL;
  + char *root = NULL;
  + char *tls_cert = "/etc/ssl/certs/ssmtp.pem";        /* Default Certificate 
*/
  +-char *uad = (char)NULL;
  ++char *uad = (char *)NULL;
  + 
  + headers_t headers, *ht;
  + 
  +@@ -217,7 +220,7 @@
  + /*
  + basename() -- Return last element of path
  + */
  +-char *basename(char *str)
  ++char *mybasename(char *str)
  + {
  +     char buf[MAXPATHLEN +1], *p;
  + 
  +@@ -231,7 +234,7 @@
  +                     die("basename() -- strncpy() failed");
  +             }
  +     }
  +-    buf[MAXPATHLEN] = (char)NULL;
  ++    buf[MAXPATHLEN] = NUL;
  + 
  +     return(strdup(buf));
  + }
  +@@ -258,7 +261,7 @@
  + 
  +     p = (str + strlen(str));
  +     while(isspace((int)(*--p))) {
  +-            *p = (char)NULL;
  ++            *p = NUL;
  +     }
  + 
  +     return(p);
  +@@ -307,7 +310,7 @@
  +     q = strip_post_ws(p);
  +     if(*q == ')') {
  +             while((*--q != '('));
  +-            *q = (char)NULL;
  ++            *q = NUL;
  +     }
  +     (void)strip_post_ws(p);
  + 
  +@@ -350,7 +353,7 @@
  +     char *p;
  + 
  +     if((p = strchr(str, '\n'))) {
  +-            *p = (char)NULL;
  ++            *p = NUL;
  +     }
  + 
  +     /* Any line beginning with a dot has an additional dot inserted;
  +@@ -383,7 +386,7 @@
  +             while(fgets(buf, sizeof(buf), fp)) {
  +                     /* Make comments invisible */
  +                     if((p = strchr(buf, '#'))) {
  +-                            *p = (char)NULL;
  ++                            *p = NUL;
  +                     }
  + 
  +                     /* Ignore malformed lines and comments */
  +@@ -513,7 +516,7 @@
  + #endif
  + 
  +     /* Ignore missing usernames */
  +-    if(*str == (char)NULL) {
  ++    if(*str == NUL) {
  +             return;
  +     }
  + 
  +@@ -570,7 +573,7 @@
  +             }
  + 
  +             /* End of string? */
  +-            if(*(q + 1) == (char)NULL) {
  ++            if(*(q + 1) == NUL) {
  +                     got_addr = True;
  +             }
  + 
  +@@ -578,7 +581,7 @@
  +             if((*q == ',') && (in_quotes == False)) {
  +                     got_addr = True;
  + 
  +-                    *q = (char)NULL;
  ++                    *q = NUL;
  +             }
  + 
  +             if(got_addr) {
  +@@ -670,7 +673,7 @@
  +     if(strncasecmp(ht->string, "From:", 5) == 0) {
  + #if 1
  +             /* Hack check for NULL From: line */
  +-            if(*(p + 6) == (char)NULL) {
  ++            if(*(p + 6) == NUL) {
  +                     return;
  +             }
  + #endif
  +@@ -731,7 +734,7 @@
  +     size_t size = BUF_SZ, len = 0;
  +     char *p = (char *)NULL, *q = (char *)NULL;
  +     bool_t in_header = True;
  +-    char l = (char)NULL;
  ++    char l = NUL;
  +     int c;
  + 
  +     while(in_header && ((c = fgetc(stream)) != EOF)) {
  +@@ -766,9 +769,9 @@
  +                                             in_header = False;
  + 
  +                             default:
  +-                                            *q = (char)NULL;
  ++                                            *q = NUL;
  +                                             if((q = strrchr(p, '\n'))) {
  +-                                                    *q = (char)NULL;
  ++                                                    *q = NUL;
  +                                             }
  +                                             header_save(p);
  + 
  +@@ -798,7 +801,7 @@
  +     while(fgets(buf, sizeof(buf), fp)) {
  +             /* Make comments invisible */
  +             if((p = strchr(buf, '#'))) {
  +-                    *p = (char)NULL;
  ++                    *p = NUL;
  +             }
  + 
  +             /* Ignore malformed lines and comments */
  +@@ -1181,7 +1184,7 @@
  +                     buf[i++] = c;
  +             }
  +     }
  +-    buf[i] = (char)NULL;
  ++    buf[i] = NUL;
  + 
  +     return(buf);
  + }
  +@@ -1551,7 +1554,7 @@
  +             j = 0;
  + 
  +             add = 1;
  +-            while(argv[i][++j] != (char)NULL) {
  ++            while(argv[i][++j] != NUL) {
  +                     switch(argv[i][j]) {
  + #ifdef INET6
  +                     case '6':
  +@@ -1867,7 +1870,7 @@
  +     (void)signal(SIGTTOU, SIG_IGN);
  + 
  +     /* Set the globals */
  +-    prog = basename(argv[0]);
  ++    prog = mybasename(argv[0]);
  + 
  +     if(gethostname(hostname, MAXHOSTNAMELEN) == -1) {
  +             die("Cannot get the name of this machine");
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/ssmtp/ssmtp.spec
  ============================================================================
  $ cvs diff -u -r1.67 -r1.68 ssmtp.spec
  --- openpkg-src/ssmtp/ssmtp.spec      19 Sep 2007 11:50:13 -0000      1.67
  +++ openpkg-src/ssmtp/ssmtp.spec      20 Sep 2007 07:01:57 -0000      1.68
  @@ -33,7 +33,7 @@
   Group:        Mail
   License:      GPL
   Version:      2.61
  -Release:      20070919
  +Release:      20070920
   
   #   package options
   %option       with_fsl  yes
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to