diff options
author | Darin Adler <darin@src.gnome.org> | 2002-01-15 21:25:01 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2002-01-15 21:25:01 +0000 |
commit | 369ee002ccf0ec85d3ec96642cf3cdef86070fd4 (patch) | |
tree | 884298804f8dfea88c133efa9d31d220bc610c62 | |
parent | c37dff7d0956ed9b123c5bc71371b517a56af038 (diff) | |
download | nautilus-369ee002ccf0ec85d3ec96642cf3cdef86070fd4.tar.gz |
Do an ifdef in the profiler code rather than in the makefile.
* src/Makefile.am:
* src/nautilus-profiler.c:
Do an ifdef in the profiler code rather than in the makefile.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/Makefile.am | 14 | ||||
-rw-r--r-- | src/nautilus-profiler.c | 11 |
3 files changed, 19 insertions, 12 deletions
@@ -1,5 +1,11 @@ 2002-01-15 Darin Adler <darin@bentspoon.com> + * src/Makefile.am: + * src/nautilus-profiler.c: + Do an ifdef in the profiler code rather than in the makefile. + +2002-01-15 Darin Adler <darin@bentspoon.com> + * NEWS: Prepare for 1.1.1 release. * TODO: A few things got done. diff --git a/src/Makefile.am b/src/Makefile.am index fbfe13ee5..fff64e1d4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,13 +32,6 @@ nautilus_shell_interface_idl_sources = \ nautilus-shell-interface.h \ nautilus-shell-interface-common.c -if ENABLE_PROFILER -profiler_headers = nautilus-profiler.h -profiler_sources = nautilus-profiler.c -else -profiler_dist = nautilus-profiler.h nautilus-profiler.c -endif - nautilus_SOURCES = \ $(nautilus_shell_interface_idl_sources) \ nautilus-about.c \ @@ -55,6 +48,7 @@ nautilus_SOURCES = \ nautilus-main.c \ nautilus-navigation-bar.c \ nautilus-preferences-dialog.c \ + nautilus-profiler.c \ nautilus-property-browser.c \ nautilus-search-bar-criterion.c \ nautilus-search-bar.c \ @@ -75,7 +69,6 @@ nautilus_SOURCES = \ nautilus-window-toolbars.c \ nautilus-window.c \ nautilus-zoom-control.c \ - $(profiler_sources) \ nautilus-about.h \ nautilus-applicable-views.h \ nautilus-application.h \ @@ -89,7 +82,8 @@ nautilus_SOURCES = \ nautilus-location-bar.h \ nautilus-main.h \ nautilus-navigation-bar.h \ - nautilus-preferences-dialog.h \ + nautilus-preferences-dialog.h \ + nautilus-profiler.h \ nautilus-property-browser.h \ nautilus-search-bar-criterion-private.h \ nautilus-search-bar-criterion.h \ @@ -111,7 +105,6 @@ nautilus_SOURCES = \ nautilus-window-private.h \ nautilus-window.h \ nautilus-zoom-control.h \ - $(profiler_headers) \ $(NULL) $(nautilus_shell_interface_idl_sources): nautilus_shell_interface_idl_stamp @@ -146,7 +139,6 @@ EXTRA_DIST = \ check-nautilus \ nautilus-shell-interface.idl \ run-nautilus \ - $(profiler_dist) \ $(NULL) BUILT_SOURCES = \ diff --git a/src/nautilus-profiler.c b/src/nautilus-profiler.c index 7c59ad984..7ee014159 100644 --- a/src/nautilus-profiler.c +++ b/src/nautilus-profiler.c @@ -29,6 +29,8 @@ #include <config.h> #include "nautilus-profiler.h" +#ifdef ENABLE_PROFILER + #include <eel/eel-gtk-extensions.h> #include <eel/eel-vfs-extensions.h> #include <glib.h> @@ -279,6 +281,7 @@ nautilus_profiler_bonobo_ui_report_callback (BonoboUIComponent *component, { char *dump_file_name; char *uri; + int fd; int dump_size = 0; char *dump_contents = NULL; @@ -290,7 +293,11 @@ nautilus_profiler_bonobo_ui_report_callback (BonoboUIComponent *component, dump_file_name = g_strdup ("/tmp/nautilus-profile-log-XXXXXX"); - if (mktemp (dump_file_name) != dump_file_name) { + fd = mkstemp (dump_file_name); + + if (fd != -1) { + close (fd); + } else { g_free (dump_file_name); dump_file_name = g_strdup_printf ("/tmp/nautilus-profile-log.%d", getpid ()); } @@ -313,3 +320,5 @@ nautilus_profiler_bonobo_ui_report_callback (BonoboUIComponent *component, g_free (dump_file_name); } + +#endif |