[geany/geany-plugins] f45d64: Fix include for openpty() on FreeBSD

Colomban Wendling git-noreply at xxxxx
Mon Apr 6 18:23:02 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Mon, 06 Apr 2015 18:23:02 UTC
Commit:      f45d6408a7285fb72fb9b949d2d3a5564eae15ae
             https://github.com/geany/geany-plugins/commit/f45d6408a7285fb72fb9b949d2d3a5564eae15ae

Log Message:
-----------
Fix include for openpty() on FreeBSD


Modified Paths:
--------------
    build/debugger.m4
    build/scope.m4
    debugger/src/debug.c
    scope/src/conterm.c

Modified: build/debugger.m4
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -4,6 +4,7 @@ AC_DEFUN([GP_CHECK_DEBUGGER],
     GP_CHECK_PLUGIN_GTK2_ONLY([Debugger])
     GP_CHECK_PLUGIN_DEPS([debugger], [VTE],
                          [vte >= 0.24])
+    AC_CHECK_HEADERS([util.h pty.h libutil.h])
     GP_COMMIT_PLUGIN_STATUS([Debugger])
     AC_CONFIG_FILES([
         debugger/Makefile


Modified: build/scope.m4
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -5,6 +5,7 @@ AC_DEFUN([GP_CHECK_SCOPE],
 
     GP_CHECK_PLUGIN_DEPS([scope], [VTE],
                          [vte >= 0.17])
+    AC_CHECK_HEADERS([util.h pty.h libutil.h])
 
     GP_COMMIT_PLUGIN_STATUS([Scope])
 


Modified: debugger/src/debug.c
10 lines changed, 8 insertions(+), 2 deletions(-)
===================================================================
@@ -29,6 +29,10 @@
  * 		Contains callbacks from debugger module to handle debug state changes.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 
 #include <stdlib.h>
@@ -37,9 +41,11 @@ int grantpt(int fd);
 
 #include <string.h>
 #include <unistd.h>
-#ifdef __APPLE__
+#if defined(HAVE_UTIL_H)
 #include <util.h>
-#else
+#elif defined(HAVE_LIBUTIL_H)
+#include <libutil.h>
+#elif defined(HAVE_PTY_H)
 #include <pty.h>
 #endif
 #include <gtk/gtk.h>


Modified: scope/src/conterm.c
10 lines changed, 8 insertions(+), 2 deletions(-)
===================================================================
@@ -17,6 +17,10 @@
  *  along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
@@ -30,9 +34,11 @@
 #ifdef G_OS_UNIX
 #include <vte/vte.h>
 /* instead of detecting N kinds of *nix */
-#ifdef __APPLE__
+#if defined(HAVE_UTIL_H)
 #include <util.h>
-#else
+#elif defined(HAVE_LIBUTIL_H)
+#include <libutil.h>
+#elif defined(HAVE_PTY_H)
 #include <pty.h>
 #endif
 int grantpt(int fd);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list