>>>>> "Fabrice" == Fabrice POPINEAU <popineau(a)ese-metz.fr> writes:
Fabrice> --=_004B5E32802566DA0049BDDD802566DA_=
Fabrice> Content-Type: text/plain; charset="us-ascii"
Fabrice> Content-Transfer-Encoding: 7bit
Fabrice> Adrian Aichner <aichner(a)ecf.teradyne.com> writes:
>> When I define MAIL_USE_POP, I can't get movemail.c compile due to
>> undefined macros like O_CREAT. I tried compiling with HAVE_FCNTL_H
>> too, to get <fcntl.h> included. Even adding _POSIX_=1 did not do the
>> trick.
>>
>> As always, any help would be appreciated.
>>
>> Adrian
>>
Fabrice> This is the quick and dirty one that will do the
Fabrice> trick. Something is wrong with native win32 in
Fabrice> src/systime.h, because including winsock bugs withe
Fabrice> redefinition of dome types.
Fabrice> Also, movemail.exe need to be linked to winsock to use pop.
Fabrice> I guess there are cleaner ways to handle the cases login/password
Fabrice> stuff, but I doubt they are useful under native win32.
Hello Fabrice,
it got too EARLY this morning to give you the success story. I
applied your movemail.c and pop.c patches from 21.2b5.diff.
Manually I merged the rule for movemail.exe into xemacs.mak,
and I defined MAIL_USE_POP in config.h.
I will try your new patch in this file later today.
Thanks for your help!
Adrian
PS: Unfortuntely movemail.exe isn't a bit better than the lisp
function nnmail-pop3-movemail. It does not support UIDL to retrieve
messages which haven't retrieved yet. In fact nnmail-pop3-movemail at
least gives a progress report:
Retrieving message X of Y from MAILHOST...
which movemail.exe doesn't.
I hope Andy's work on POP3 mail will be available soon.
Fabrice> --
Fabrice> Fabrice POPINEAU
Fabrice> ------------------------
Fabrice> e-mail: popineau(a)ese-metz.fr | "God is real ...
Fabrice> Fabrice.POPINEAU(a)supelec.fr |
Fabrice> voice-mail: +33 (0) 387764715 | ... unless integer ?"
Fabrice> surface-mail: Supelec, 2 rue E. Belin, |
Fabrice> F-57078 Metz Cedex 3 |
Fabrice> - /tmp/xemacs.patch
Fabrice> --=_004B5E32802566DA0049BDDD802566DA_=
Fabrice> Content-Type: application/octet-stream; name="xemacs.patch"
Fabrice> Content-Transfer-Encoding: quoted-printable
Fabrice> Content-Disposition: attachment; filename="xemacs.patch"
Fabrice> --- nt/xemacs.mak~ Mon Dec 14 11:20:29 1998
Fabrice> +++ nt/xemacs.mak Mon Dec 14 14:06:27 1998
Fabrice> @@ -504,6 +504,9 @@
Fabrice> ETAGS=5FDEPS =3D $(LIB=5FSRC)/getopt.c $(LIB=5FSRC)/getopt1.c $(LIB=5FSRC)=
Fabrice> /../src/regex.c
Fabrice> $(LIB=5FSRC)/etags.exe : $(LIB=5FSRC)/etags.c $(ETAGS=5FDEPS)
Fabrice> $(LIB=5FSRC)/movemail.exe: $(LIB=5FSRC)/movemail.c $(LIB=5FSRC)/pop.c $(ET=
Fabrice> AGS=5FDEPS)
Fabrice> + @cd $(LIB=5FSRC)
Fabrice> + $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB=5FSRC=5FDEFINES) -O2 =
Fabrice> -W3 -Fe$@ $** wsock32.lib
Fabrice> + @cd $(NT)
Fabrice> =20
Fabrice> LIB=5FSRC=5FTOOLS =3D \
Fabrice> $(LIB=5FSRC)/make-docfile.exe \
Fabrice> --- src/config.h~ Mon Dec 14 11:20:29 1998
Fabrice> +++ src/config.h Mon Dec 14 14:00:55 1998
Fabrice> @@ -605,7 +605,7 @@
Fabrice> =20
Fabrice> /* movemail options */
Fabrice> /* Should movemail use POP3 for mail access? */
Fabrice> -#undef MAIL=5FUSE=5FPOP
Fabrice> +#define MAIL=5FUSE=5FPOP
Fabrice> /* Should movemail use kerberos for POP authentication? */
Fabrice> #undef KERBEROS
Fabrice> /* Should movemail use hesiod for getting POP server host? */
Fabrice> --- lib-src/pop.c~ Tue Mar 31 21:10:58 1998
Fabrice> +++ lib-src/pop.c Mon Dec 14 14:05:30 1998
Fabrice> @@ -38,7 +38,7 @@
Fabrice> =20
Fabrice> #include <sys/types.h>
Fabrice> #ifdef WINDOWSNT
Fabrice> -#include "ntlib.h"
Fabrice> +#include "../src/config.h"
Fabrice> #include <winsock.h>
Fabrice> #undef SOCKET=5FERROR
Fabrice> #define RECV(s,buf,len,flags) recv(s,buf,len,flags)
Fabrice> @@ -77,7 +77,9 @@
Fabrice> #include <sys/stat.h>
Fabrice> #include <sys/file.h>
Fabrice> #include "../src/syswait.h"
Fabrice> +#ifndef WINDOWSNT
Fabrice> #include "../src/systime.h"
Fabrice> +#endif
Fabrice> #include <stdlib.h>
Fabrice> #include <string.h>
Fabrice> =20
Fabrice> @@ -183,6 +185,7 @@
Fabrice> username =3D getenv ("USER");
Fabrice> if (! (username && *username))
Fabrice> {
Fabrice> +#ifndef WINDOWSNT
Fabrice> username =3D getlogin ();
Fabrice> if (! (username && *username))
Fabrice> {
Fabrice> @@ -198,6 +201,10 @@
Fabrice> return (0);
Fabrice> }
Fabrice> }
Fabrice> +#else
Fabrice> + strcpy (pop=5Ferror, "Could not determine username");
Fabrice> + return (0);
Fabrice> +#endif
Fabrice> }
Fabrice> }
Fabrice> =20
Fabrice> @@ -247,10 +254,12 @@
Fabrice> =20
Fabrice> if ((! password) && (! DONT=5FNEED=5FPASSWORD))
Fabrice> {
Fabrice> +#ifndef WINDOWSNT
Fabrice> if (! (flags & POP=5FNO=5FGETPASS))
Fabrice> {
Fabrice> password =3D getpass ("Enter POP password:");
Fabrice> }
Fabrice> +#endif
Fabrice> if (! password)
Fabrice> {
Fabrice> strcpy (pop=5Ferror, "Could not determine POP password");
Fabrice> --- lib-src/movemail.c~ Mon Dec 14 11:16:35 1998
Fabrice> +++ lib-src/movemail.c Mon Dec 14 14:05:08 1998
Fabrice> @@ -61,8 +61,11 @@
Fabrice> #include <sys/file.h>
Fabrice> #include <stdio.h>
Fabrice> #include <errno.h>
Fabrice> +#include "../src/sysfile.h"
Fabrice> #include "../src/syswait.h"
Fabrice> +#ifndef WINDOWSNT
Fabrice> #include "../src/systime.h"
Fabrice> +#endif
Fabrice> #include <stdlib.h>
Fabrice> #include <string.h>
Fabrice> #include "getopt.h"
Fabrice> @@ -305,7 +308,9 @@
Fabrice> exit (retcode);
Fabrice> }
Fabrice> =20
Fabrice> +#ifndef WINDOWSNT
Fabrice> setuid (getuid ());
Fabrice> +#endif
Fabrice> #endif /* MAIL=5FUSE=5FPOP */
Fabrice> =20
Fabrice> #ifndef DISABLE=5FDIRECT=5FACCESS
Fabrice> @@ -632,7 +637,7 @@
Fabrice> error ("Error in open: %s, %s", strerror (errno), outfile);
Fabrice> return (1);
Fabrice> }
Fabrice> -#ifndef =5F=5FCYGWIN32=5F=5F
Fabrice> +#if !defined(=5F=5FCYGWIN32=5F=5F) && !defined(WINDOWSNT)
Fabrice> fchown (mbfi, getuid (), -1);
Fabrice> #endif
Fabrice> =20
Fabrice> --=_004B5E32802566DA0049BDDD802566DA_=--