(bind-func sys_temp_dir_get
(lambda ()
(let ((pool (apr_pool_create))
(dirname_ptr:i8** (salloc))
(res APR_SUCCESS)
(tmpdir null))
(set! res (apr_temp_dir_get dirname_ptr pool))
(set! tmpdir (Str (pref dirname_ptr 0)))
(apr_pool_destroy pool)
(if (= res APR_SUCCESS) tmpdir null))))