Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / glibmm2 / glib / src / spawn.hg
index d9ea0caf2fb81175e8ba02e90aa61a6041f0f066..40adfa602fe245d6e7f0aede705bb9e10517210b 100644 (file)
@@ -3,16 +3,16 @@
 /* Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
+ * modify it under the terms of the GNU Library General Public
  * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * version 2 of the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU Lesser General Public
+ * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
@@ -192,7 +192,6 @@ _WRAP_GERROR(SpawnError, GSpawnError, G_SPAWN_ERROR, NO_GTYPE, s#^2BIG$#TOOBIG#)
  * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output,
  * and @a standard_error will not be filled with valid values.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_async_with_pipes(const std::string& working_directory,
                             const Glib::ArrayHandle<std::string>& argv,
                             const Glib::ArrayHandle<std::string>& envp,
@@ -202,17 +201,6 @@ void spawn_async_with_pipes(const std::string& working_directory,
                             int* standard_input = 0,
                             int* standard_output = 0,
                             int* standard_error = 0);
-#else
-void spawn_async_with_pipes(const std::string& working_directory,
-                            const Glib::ArrayHandle<std::string>& argv,
-                            const Glib::ArrayHandle<std::string>& envp,
-                            SpawnFlags flags,
-                            const sigc::slot<void>& child_setup,
-                            Pid* child_pid,
-                            int* standard_input,
-                            int* standard_output,
-                            int* standard_error, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** Like the main spawn_async_with_pipes() method, but inheriting the parent's environment.
  *
@@ -231,7 +219,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
  * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output,
  * and @a standard_error will not be filled with valid values.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
+
 void spawn_async_with_pipes(const std::string& working_directory,
                             const Glib::ArrayHandle<std::string>& argv,
                             SpawnFlags flags = SpawnFlags(0),
@@ -240,16 +228,6 @@ void spawn_async_with_pipes(const std::string& working_directory,
                             int* standard_input = 0,
                             int* standard_output = 0,
                             int* standard_error = 0);
-#else
-void spawn_async_with_pipes(const std::string& working_directory,
-                            const Glib::ArrayHandle<std::string>& argv,
-                            SpawnFlags flags,
-                            const sigc::slot<void>& child_setup,
-                            Pid* child_pid,
-                            int* standard_input,
-                            int* standard_output,
-                            int* standard_error, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** See pawn_async_with_pipes() for a full description. This function
  * simply calls the spawn_async_with_pipes() without any pipes.
@@ -272,21 +250,12 @@ void spawn_async_with_pipes(const std::string& working_directory,
  * the message field of returned errors should be displayed
  * to users.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_async(const std::string& working_directory,
                  const Glib::ArrayHandle<std::string>& argv,
                  const Glib::ArrayHandle<std::string>& envp,
                  SpawnFlags flags = SpawnFlags(0),
                  const sigc::slot<void>& child_setup = sigc::slot<void>(),
                  Pid* child_pid = 0);
-#else
-void spawn_async(const std::string& working_directory,
-                 const Glib::ArrayHandle<std::string>& argv,
-                 const Glib::ArrayHandle<std::string>& envp,
-                 SpawnFlags flags,
-                 const sigc::slot<void>& child_setup,
-                 Pid* child_pid, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** Like the main spawn_async() method, but inheriting the parent's environment.
  *
@@ -302,19 +271,11 @@ void spawn_async(const std::string& working_directory,
  * the message field of returned errors should be displayed
  * to users.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_async(const std::string& working_directory,
                  const Glib::ArrayHandle<std::string>& argv,
                  SpawnFlags flags = SpawnFlags(0),
                  const sigc::slot<void>& child_setup = sigc::slot<void>(),
                  Pid* child_pid = 0);
-#else
-void spawn_async(const std::string& working_directory,
-                 const Glib::ArrayHandle<std::string>& argv,
-                 SpawnFlags flags,
-                 const sigc::slot<void>& child_setup,
-                 Pid* child_pid, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** Executes a child synchronously (waits for the child to exit before returning).
  * All output from the child is stored in @a standard_output and @a standard_error,
@@ -348,7 +309,6 @@ void spawn_async(const std::string& working_directory,
  * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output,
  * and @a standard_error will not be filled with valid values.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_sync(const std::string& working_directory,
                 const Glib::ArrayHandle<std::string>& argv,
                 const Glib::ArrayHandle<std::string>& envp,
@@ -357,16 +317,6 @@ void spawn_sync(const std::string& working_directory,
                 std::string* standard_output = 0,
                 std::string* standard_error = 0,
                 int* exit_status = 0);
-#else
-void spawn_sync(const std::string& working_directory,
-                const Glib::ArrayHandle<std::string>& argv,
-                const Glib::ArrayHandle<std::string>& envp,
-                SpawnFlags flags,
-                const sigc::slot<void>& child_setup,
-                std::string* standard_output,
-                std::string* standard_error,
-                int* exit_status, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** Like the main spawn_sync() method, but inheriting the parent's environment.
  * 
@@ -384,7 +334,6 @@ void spawn_sync(const std::string& working_directory,
  * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output,
  * and @a standard_error will not be filled with valid values.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_sync(const std::string& working_directory,
                 const Glib::ArrayHandle<std::string>& argv,
                 SpawnFlags flags = SpawnFlags(0),
@@ -392,15 +341,6 @@ void spawn_sync(const std::string& working_directory,
                 std::string* standard_output = 0,
                 std::string* standard_error = 0,
                 int* exit_status = 0);
-#else
-void spawn_sync(const std::string& working_directory,
-                const Glib::ArrayHandle<std::string>& argv,
-                SpawnFlags flags,
-                const sigc::slot<void>& child_setup,
-                std::string* standard_output,
-                std::string* standard_error ,
-                int* exit_status, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** A simple version of spawn_async() that parses a command line with
  * shell_parse_argv() and passes it to spawn_async(). It runs a
@@ -419,11 +359,7 @@ void spawn_sync(const std::string& working_directory,
  * to users.
  * @throws ShellError If the command line could not be parsed.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_command_line_async(const std::string& command_line);
-#else
-void spawn_command_line_async(const std::string& command_line, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** A simple version of spawn_sync() with little-used parameters
  * removed, taking a command line instead of an argument vector.  See
@@ -458,17 +394,10 @@ void spawn_command_line_async(const std::string& command_line, std::auto_ptr<Gli
  * to users.
  * @throws ShellError If the command line could not be parsed.
  */
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
 void spawn_command_line_sync(const std::string& command_line,
                              std::string* standard_output = 0,
                              std::string* standard_error = 0,
                              int* exit_status = 0);
-#else
-void spawn_command_line_sync(const std::string& command_line,
-                             std::string* standard_output,
-                             std::string* standard_error,
-                             int* exit_status, std::auto_ptr<Glib::Error>& error;
-#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 /** On some platforms, notably WIN32, the Pid type represents a resource
  * which must be closed to prevent resource leaking. close_pid()