diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-11-14 13:37:33 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-11-14 13:37:33 +0000 |
commit | b4853081fbde54085eae5cd5a63c74f15ae7bd7c (patch) | |
tree | 2e8755021e2c3b5cca52b0e4e10146165c9a06fa /src/main.c | |
parent | 2b50a343b791d265880e8a80f2843fee320aef08 (diff) | |
download | mailfromd-b4853081fbde54085eae5cd5a63c74f15ae7bd7c.tar.gz mailfromd-b4853081fbde54085eae5cd5a63c74f15ae7bd7c.tar.bz2 |
New option -O (--optimize)
git-svn-id: file:///svnroot/mailfromd/trunk@909 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -57,6 +57,7 @@ int config_dump_macros; /* Dump used Sendmail macros */ int do_transcript; /* Enable session transript */ int do_trace; /* Enable tracing configuration */ int debug_level; /* Debugging level */ +unsigned optimization_level = 1; /* Optimization level */ int prog_trace_option; /* Trace program execution */ int log_to_stderr; /* Use stderr for logging */ char *smtp_domain; /* Default SMTP domain for EHLO command */ @@ -731,7 +732,7 @@ enum mailfromd_option { OPTION_LIST, OPTION_LOCK_RETRY_COUNT, OPTION_LOCK_RETRY_TIMEOUT, - OPTION_MILTER_TIMEOUT, + OPTION_MILTER_TIMEOUT, OPTION_PIDFILE, OPTION_POSTMASTER_EMAIL, OPTION_PREDICT_NEXT, @@ -825,6 +826,8 @@ static struct argp_option options[] = { GRP+1 }, { "source", 'S', N_("ADDRESS"), 0, N_("Set source address for TCP connections"), GRP+1 }, + { "optimize", 'O', N_("LEVEL"), OPTION_ARG_OPTIONAL, + N_("Set code optimization level"), GRP+1 }, #undef GRP #undef GRP @@ -969,6 +972,17 @@ parse_opt (int key, char *arg, struct argp_state *state) force_remove = 1; break; + case 'O': + if (!arg) + optimization_level = 1; + else { + char *p; + optimization_level = strtoul(arg, &p, 0); + if (*p) + argp_error(state, "-Olevel must be positive"); + } + break; + case 'S': set_option("source", arg, 1); break; |