aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-02-16 06:28:50 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-02-16 06:28:50 +0000
commitbd57c85d9a2cc1e95e0ae16168b764204755e143 (patch)
tree61136f88ae3f61465fef9f5a224a35364cadfae7 /rcfile_y.y
parent9e96c6bc3494dfe34655a02df8f735bce71d86a6 (diff)
downloadfetchmail-bd57c85d9a2cc1e95e0ae16168b764204755e143.tar.gz
fetchmail-bd57c85d9a2cc1e95e0ae16168b764204755e143.tar.bz2
fetchmail-bd57c85d9a2cc1e95e0ae16168b764204755e143.zip
Alll of Craig Metz's changes for IPv6 and IPSEC except the POP3 stuff.
svn path=/trunk/; revision=1630
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y37
1 files changed, 29 insertions, 8 deletions
diff --git a/rcfile_y.y b/rcfile_y.y
index 71d8ea4b..dd8b7654 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -68,7 +68,7 @@ extern char * yytext;
%token <sval> STRING
%token <number> NUMBER
%token NO KEEP FLUSH FETCHALL REWRITE FORCECR STRIPCR PASS8BITS DROPSTATUS
-%token DNS PORT UIDL INTERVAL
+%token DNS SERVICE PORT UIDL INTERVAL
%%
@@ -126,11 +126,24 @@ serv_option : AKA alias_list
| PROTOCOL KPOP {
current.server.protocol = P_POP3;
current.server.preauthenticate = A_KERBEROS_V4;
+#if INET6
+ current.server.service = KPOP_PORT;
+#else /* INET6 */
current.server.port = KPOP_PORT;
+#endif /* INET6 */
}
| UIDL {current.server.uidl = FLAG_TRUE;}
| NO UIDL {current.server.uidl = FLAG_FALSE;}
- | PORT NUMBER {current.server.port = $2;}
+ | SERVICE STRING {
+#if INET6
+ current.server.service = $2;
+#endif /* INET6 */
+ }
+ | PORT NUMBER {
+#if !INET6
+ current.server.port = $2;
+#endif /* !INET6 */
+ }
| INTERVAL NUMBER {current.server.interval = $2;}
| AUTHENTICATE PASSWORD {current.server.preauthenticate = A_PASSWORD;}
| AUTHENTICATE KERBEROS4 {current.server.preauthenticate = A_KERBEROS_V4;}
@@ -151,18 +164,18 @@ serv_option : AKA alias_list
| QVIRTUAL STRING {current.server.qvirtual = xstrdup($2);}
| INTERFACE STRING {
-#ifdef linux
+#if defined(linux) && !defined(INET6)
interface_parse($2, &current.server);
-#else
+#else /* defined(linux) && !defined(INET6) */
fprintf(stderr, "fetchmail: interface option is only supported under Linux\n");
-#endif /* linux */
+#endif /* defined(linux) && !defined(INET6) */
}
| MONITOR STRING {
-#ifdef linux
+#if defined(linux) && !defined(INET6)
current.server.monitor = xstrdup($2);
-#else
+#else /* defined(linux) && !defined(INET6) */
fprintf(stderr, "fetchmail: monitor option is only supported under Linux\n");
-#endif /* linux */
+#endif /* defined(linux) && !defined(INET6) */
}
| DNS {current.server.dns = FLAG_TRUE;}
| NO DNS {current.server.dns = FLAG_FALSE;}
@@ -412,7 +425,11 @@ static void record_current(void)
#define FLAG_FORCE(fld) if (cmd_opts.fld) current.fld = cmd_opts.fld
FLAG_FORCE(server.via);
FLAG_FORCE(server.protocol);
+#if INET6
+ FLAG_FORCE(server.service);
+#else /* INET6 */
FLAG_FORCE(server.port);
+#endif /* INET6 */
FLAG_FORCE(server.interval);
FLAG_FORCE(server.preauthenticate);
FLAG_FORCE(server.timeout);
@@ -471,7 +488,11 @@ void optmerge(struct query *h2, struct query *h1)
#define FLAG_MERGE(fld) if (!h2->fld) h2->fld = h1->fld
FLAG_MERGE(server.via);
FLAG_MERGE(server.protocol);
+#if INET6
+ FLAG_MERGE(server.service);
+#else /* INET6 */
FLAG_MERGE(server.port);
+#endif /* INET6 */
FLAG_MERGE(server.interval);
FLAG_MERGE(server.preauthenticate);
FLAG_MERGE(server.timeout);