aboutsummaryrefslogtreecommitdiff
path: root/mfd/prog.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-05-11 00:10:42 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-05-11 00:10:42 +0300
commitffd2cf189d926abe00de0a79f292f1ea69d02aac (patch)
treeac5047e0bf1a0f2b579bf0d40299d59b2b26cc84 /mfd/prog.c
parent998eaf2cdb444ee77ff67068ce3586de1eea8e4e (diff)
downloadmailfromd-ffd2cf189d926abe00de0a79f292f1ea69d02aac.tar.gz
mailfromd-ffd2cf189d926abe00de0a79f292f1ea69d02aac.tar.bz2
Implement some system information functions.
* mfd/bi_gethostname.m4: New file. * NEWS, doc/mailfromd.texi: Update. * mfd/Makefile.am (M4_FILES): Add bi_gethostname.m4. * mfd/bi_system.m4 (uname): New function. * mfd/prog.c (heap_obstack_cancel, heap_obstack_base): New function. * mfd/prog.h: Likewise. * mfd/snarf.m4 (MF_OBSTACK_BASE, MF_OBSTACK_CANCEL): New defuns. * mtasim/mtasim.c (stop_mailfromd): Reset signal handler before doing kill, so that waitpid works on hosts with BSD signal semantics.
Diffstat (limited to 'mfd/prog.c')
-rw-r--r--mfd/prog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mfd/prog.c b/mfd/prog.c
index 3c92a9a7..90a426eb 100644
--- a/mfd/prog.c
+++ b/mfd/prog.c
@@ -655,4 +655,12 @@ heap_obstack_begin(eval_environ_t env)
}
+void
+heap_obstack_cancel(eval_environ_t env)
+{
+ env->toh = env->temp_start;
+ env->temp_start = 0;
+ env->temp_size = 0;
+}
+
STKVAL
heap_obstack_finish(eval_environ_t env)
@@ -681,4 +689,10 @@ heap_obstack_grow(eval_environ_t env, void *ptr, size_t size)
}
+void *
+heap_obstack_base(eval_environ_t env)
+{
+ return (void*) env_data_ref(env, env->temp_start);
+}
+
STKVAL *
env_data_ref(eval_environ_t env, size_t off)

Return to:

Send suggestions and report system problems to the System administrator.