]> zub.fei.tuke.sk Git - ldapvmail/commitdiff
porting to 64 bit requires some pointer -> int -> poiter ->int changes 0.6
authorPeter Popovec <popovec@fei.tuke.sk>
Thu, 25 Sep 2008 10:21:00 +0000 (12:21 +0200)
committerPeter Popovec <popovec@fei.tuke.sk>
Tue, 26 Jun 2007 07:00:00 +0000 (09:00 +0200)
Makefile
debian/changelog
debian/control
ldapadd.c
ldaplogin.c
ldappass.c
vmail.c
vmailHelper.c

index 849772708306fa228a110d99c7a78c9e71e3c8d0..b2c9c5d0552c353bacfdb276346e39461279e907 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
-CFLAGS= -g -O2 -Wshadow  -Wstrict-prototypes -Wcast-align -Wall
+CFLAGS= -g -O2 -Wshadow  -Wcast-align -Wall
 
 vmail: vmail.o ldaplogin.o ldappass.o vmailsetup.o vmailHelper.o ldapadd.o
-       cc ${CFLAGS}  -Wall -lnewt -lldap vmailHelper.o ldapadd.o vmailsetup.o vmail.o ldappass.o ldaplogin.o -o vmail
+       cc ${CFLAGS}  -Wall -lcrypt -lnewt -lldap vmailHelper.o ldapadd.o vmailsetup.o vmail.o ldappass.o ldaplogin.o -o vmail
 
 vmail.o:       vmail.c
        cc ${CFLAGS}  -Wall -c vmail.c -o vmail.o
index da6c7c940943d323ea7630b9aec0b83f99b0ba9a..7251943a1e8a928d79a7b948e78de0b27d55f0fd 100644 (file)
@@ -1,3 +1,9 @@
+ldapvmail (0.6) unstable; urgency=low
+
+  * porting to 64 bit requires some pointer -> int -> poiter ->int changes
+
+ -- Peter Popovec <popovec@fei.tuke.sk>  Thu, 25 Sep 2008 11:29:53 +0200
+
 ldapvmail (0.5) unstable; urgency=low
 
   * for forward  "leave mial in mailbox" signaling
index 29e46d27a4efc66f4f3d8df6969dcaa8aac3b0b0..ce760157b8eaf84585dea3050683e763d8f4d368 100644 (file)
@@ -2,7 +2,7 @@ Source: ldapvmail
 Section: unknown
 Priority: optional
 Maintainer: Peter Popovec <popovec@fei.tuke.sk>
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 5), libldap-dev, libnewt-dev
 Standards-Version: 3.7.2
 
 Package: ldapvmail
index 2f69955d8758b94f367d09e4c6c38675c4d4c58b..8fd593d098cc4fbc09817991c2c8b03c1cebbaa8 100644 (file)
--- a/ldapadd.c
+++ b/ldapadd.c
@@ -1,5 +1,6 @@
 #define _XOPEN_SOURCE
 #define _GNU_SOURCE
+#define LDAP_DEPRECATED 1
 #include <string.h>
 #include <stdlib.h>
 
@@ -20,7 +21,7 @@ newAccount ()
   const char *DN, *PW, *GN, *SN;
   char *newDN;
   LDAP *ld;
-  char *addAttrxValue[8];
+  char *addAttrxValue[9];
 
 
 /* form 1 POP3 ACCOUNT */
index bd1a92ab93726b4554c4b324baef179ba74fac37..acb96fd1c74517bd6a65297adf4763b3695d1c1b 100644 (file)
@@ -2,7 +2,7 @@
 //     (but only type and expire value is significant for init)
 
 #define _GNU_SOURCE
-
+#define LDAP_DEPRECATED 1
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index fa6d192e8d906970cda7511cd4ea7e64acf68ecf..3a1944152dcf75f4c378777b6ee12ae4361eda67 100644 (file)
@@ -1,5 +1,6 @@
 #define _GNU_SOURCE
 #define _XOPEN_SOURCE
+#define LDAP_DEPRECATED 1
 #include <unistd.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/vmail.c b/vmail.c
index 197a9ad899737fafe097ef15bc83d6c517cc4f77..c24d22541f65ee1b022f75b2981b8884d68ae95d 100644 (file)
--- a/vmail.c
+++ b/vmail.c
@@ -1,13 +1,14 @@
+#define LDAP_DEPRECATED 1
 #define _GNU_SOURCE
 #include <newt.h>
 #include <stdio.h>
-#include <ldap.h>
 #include <unistd.h>
 #include <string.h>
 #include <sys/time.h>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <ldap.h>
 #include "ldaplogin.h"
 #include "vmailHelper.h"
 #include "vmailsetup.h"
@@ -229,7 +230,7 @@ renewEdit:
       for (count = 0, value = vmail->forwardValues[0]; value;
           count++, value = vmail->forwardValues[count])
 
-       newtListboxAppendEntry (List1, value, (void *) count);
+       newtListboxAppendEntry (List1, value, (void *) (NULL + count));
       newtFormAddComponent (form, List1);
     }
   else
@@ -240,7 +241,7 @@ renewEdit:
     }
   if (vmail->aliasValues != NULL)
     {
-      Balias=NULL;
+      Balias = NULL;
       Label0 = newtLabel (1, 9, "Aliases:");
       newtFormAddComponent (form, Label0);
       List2 =
@@ -252,7 +253,7 @@ renewEdit:
       for (count = 0, value = vmail->aliasValues[0]; value;
           count++, value = vmail->aliasValues[count])
 
-       newtListboxAppendEntry (List2, value, (void *) count);
+       newtListboxAppendEntry (List2, value, (void *) (NULL + count));
       newtFormAddComponent (form, List2);
     }
   else
@@ -268,7 +269,7 @@ renewEdit:
        {
          int co;
          char *data = NULL;
-         co = (int) newtListboxGetCurrent (List0);
+         co = (int) (newtListboxGetCurrent (List0) - NULL);
        cycle1:
          {
            switch (co)
@@ -303,7 +304,7 @@ renewEdit:
          int co;
          char *data = NULL;
          realedit = 1;
-         co = (int) newtListboxGetCurrent (List1);
+         co = (int) (newtListboxGetCurrent (List1) - NULL);
          data =
            ChangeEntry ("Novy forward:", &(vmail->forwardValues[co]), 1);
          if (data != NULL)
@@ -335,14 +336,14 @@ renewEdit:
          newtListboxClear (List1);
          for (count = 0, value = vmail->forwardValues[0]; value;
               count++, value = vmail->forwardValues[count])
-           newtListboxAppendEntry (List1, value, (void *) count);
+           newtListboxAppendEntry (List1, value, (void *) (NULL + count));
        }
       if (answer == List2)
        {
          int co;
          char *data = NULL;
          realedit = 1;
-         co = (int) newtListboxGetCurrent (List2);
+         co = (int) (newtListboxGetCurrent (List2) - NULL);
          data = ChangeEntry ("Novy alias:", &(vmail->aliasValues[co]), 1);
          if (data != NULL)
            if (strlen (data) == 0)     //null length forward to the end of list
@@ -371,7 +372,7 @@ renewEdit:
          newtListboxClear (List2);
          for (count = 0, value = vmail->aliasValues[0]; value;
               count++, value = vmail->aliasValues[count])
-           newtListboxAppendEntry (List2, value, (void *) count);
+           newtListboxAppendEntry (List2, value, (void *) (NULL + count));
        }
 
       if (answer == Bpass)
@@ -539,37 +540,37 @@ ldapEdit (vmailEntry * vmail)
       addAttr0[i + 1] = NULL;
       addAttr0[i]->mod_op = LDAP_MOD_REPLACE;
       addAttr0[i]->mod_type = addAttrx[i];
-      if (addAttrx[i] == "mail")
+      if (strcmp (addAttrx[i], "mail") == 0)
        {
          addAttr0[i]->mod_values = malloc (2 * sizeof (char *));
          addAttr0[i]->mod_values[0] = vmail->mail;
          addAttr0[i]->mod_values[1] = NULL;
        }
-      if (addAttrx[i] == "mailMessageStore")
+      if (strcmp (addAttrx[i], "mailMessageStore") == 0)
        {
          addAttr0[i]->mod_values = malloc (2 * sizeof (char *));
          addAttr0[i]->mod_values[0] = vmail->mailMessageStore;
          addAttr0[i]->mod_values[1] = NULL;
        }
-      if (addAttrx[i] == "mailMessageStore")
+      if (strcmp (addAttrx[i], "mailMessageStore") == 0)
        {
          addAttr0[i]->mod_values = malloc (2 * sizeof (char *));
          addAttr0[i]->mod_values[0] = vmail->mailMessageStore;
          addAttr0[i]->mod_values[1] = NULL;
        }
-      if (addAttrx[i] == "givenName")
+      if (strcmp (addAttrx[i], "givenName") == 0)
        {
          addAttr0[i]->mod_values = malloc (2 * sizeof (char *));
          addAttr0[i]->mod_values[0] = vmail->givenName;
          addAttr0[i]->mod_values[1] = NULL;
        }
-      if (addAttrx[i] == "sn")
+      if (strcmp (addAttrx[i], "sn") == 0)
        {
          addAttr0[i]->mod_values = malloc (2 * sizeof (char *));
          addAttr0[i]->mod_values[0] = vmail->sn;
          addAttr0[i]->mod_values[1] = NULL;
        }
-      if (addAttrx[i] == "cn")
+      if (strcmp (addAttrx[i], "cn") == 0)
        {
          addAttr0[i]->mod_values = malloc (2 * sizeof (char *));
          asprintf (&
@@ -578,7 +579,7 @@ ldapEdit (vmailEntry * vmail)
          addAttr0[i]->mod_values[1] = NULL;
        }
 
-      if (addAttrx[i] == "mailAlternateAddress")
+      if (strcmp (addAttrx[i], "mailAlternateAddress") == 0)
        {
          addAttr0[i]->mod_values = vmail->aliasValues;
          if (vmail->aliasValues != NULL)
@@ -592,7 +593,7 @@ ldapEdit (vmailEntry * vmail)
                (vmail->aliasValues)++;
              }
        }
-      if (addAttrx[i] == "mailForwardingAddress")
+      if (strcmp (addAttrx[i], "mailForwardingAddress") == 0)
        {
          addAttr0[i]->mod_values = vmail->forwardValues;
          if (vmail->forwardValues != NULL)
index 4a1ae76f0dd83a618b7bbcaa63c9b676a067eea1..5a3d832519ec84dd51f26e37b3a18b533e8466b6 100644 (file)
@@ -1,3 +1,4 @@
+#define LDAP_DEPRECATED 1
 #include <newt.h>
 #include <stdio.h>
 #include <ldap.h>