commit - 245c7240766e65f25db986d5d28da9a9b92826e6
commit + 7a6dddaefd504a582aa1d600185cdd18cb338e4a
blob - b892a2737fbd3ddb11b85530d34cd64faa601a8b
blob + f6a499dbd885b285605963a25b23076855a8786f
--- gotweb/Makefile.inc
+++ gotweb/Makefile.inc
WWWGRP ?= www
CPPFLAGS += -DGOT_TMPDIR=${GOTWEB_TMP_DIR}
+
+.if defined(PROFILE)
+CPPFLAGS += -DPROFILE
+DEBUG = -O0 -pg -g -static
+.else
+DEBUG = -O0 -g
+.endif
blob - eb1b09358201b97ddb3e233fb0ac41691daa0081
blob + 2244e2870234448a6294a739c5963caf99c88f80
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
char *age = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath wpath cpath proc exec sendfd unveil",
NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
struct gw_header *header = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath wpath cpath proc exec sendfd unveil",
NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
char *age = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath wpath cpath proc exec sendfd unveil",
NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
unsigned int prev_disp = 0, next_disp = 1, dir_c = 0;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil",
NULL) == -1) {
error = got_error_from_errno("pledge");
return error;
}
-
+#endif
error = gw_apply_unveil(gw_trans->gw_conf->got_repos_path);
if (error)
return error;
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil",
NULL) == -1) {
error = got_error_from_errno("pledge");
goto done;
}
-
+#endif
error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil",
NULL) == -1) {
error = got_error_from_errno("pledge");
goto done;
}
-
+#endif
if (gw_trans->action != GW_SUMMARY) {
error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
char *age = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
char *age = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
char *href_next = NULL, *href_prev = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
struct gw_header *header = NULL;
enum kcgi_err kerr = KCGI_OK;
+#ifndef PROFILE
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
return got_error_from_errno("pledge");
-
+#endif
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");