sniper          Thu Nov 17 03:36:14 2005 EDT

  Modified files:              
    /php-src/sapi/cli   php_cli.c php_cli_readline.c 
  Log:
  - Fix compile failure when ext/readline is compiled as shared
  
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.136&r2=1.137&ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.136 php-src/sapi/cli/php_cli.c:1.137
--- php-src/sapi/cli/php_cli.c:1.136    Tue Nov 15 10:30:41 2005
+++ php-src/sapi/cli/php_cli.c  Thu Nov 17 03:36:11 2005
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.136 2005/11/15 15:30:41 iliaa Exp $ */
+/* $Id: php_cli.c,v 1.137 2005/11/17 08:36:11 sniper Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -72,11 +72,12 @@
 #include <unixlib/local.h>
 #endif
 
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
 #include <readline/readline.h>
 #if !HAVE_LIBEDIT
 #include <readline/history.h>
 #endif
+#include "php_cli_readline.h"
 #endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */
 
 #include "zend_compile.h"
@@ -84,9 +85,7 @@
 #include "zend_highlight.h"
 #include "zend_indent.h"
 
-
 #include "php_getopt.h"
-#include "php_cli_readline.h"
 
 #ifndef O_BINARY
 #define O_BINARY 0
@@ -104,7 +103,7 @@
 
 static char *php_optarg = NULL;
 static int php_optind = 1;
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
 static char php_last_char = '\0';
 #endif
 
@@ -218,7 +217,7 @@
        uint remaining = str_length;
        size_t ret;
 
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
        if (!str_length) {
                return 0;
        }
@@ -396,7 +395,7 @@
                    "       %s [options] -- [args...]\n"
                    "       %s [options] -a\n"
                    "\n"
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
                                "  -a               Run as interactive shell\n"
 #else
                                "  -a               Run interactively\n"
@@ -1002,7 +1001,7 @@
                                cli_register_file_handles(TSRMLS_C);
                        }
 
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
                        if (interactive) {
                                char *line;
                                size_t size = 4096, pos = 0, len;
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli_readline.c?r1=1.5&r2=1.6&ty=u
Index: php-src/sapi/cli/php_cli_readline.c
diff -u php-src/sapi/cli/php_cli_readline.c:1.5 
php-src/sapi/cli/php_cli_readline.c:1.6
--- php-src/sapi/cli/php_cli_readline.c:1.5     Mon Nov  7 14:12:37 2005
+++ php-src/sapi/cli/php_cli_readline.c Thu Nov 17 03:36:12 2005
@@ -17,9 +17,12 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli_readline.c,v 1.5 2005/11/07 19:12:37 helly Exp $ */
+/* $Id: php_cli_readline.c,v 1.6 2005/11/17 08:36:12 sniper Exp $ */
 
 #include "php.h"
+
+#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
+
 #include "php_globals.h"
 #include "php_variables.h"
 #include "zend_hash.h"
@@ -42,20 +45,16 @@
 #include <unixlib/local.h>
 #endif
 
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
 #include <readline/readline.h>
 #if !HAVE_LIBEDIT
 #include <readline/history.h>
 #endif
-#endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */
 
 #include "zend_compile.h"
 #include "zend_execute.h"
 #include "zend_highlight.h"
 #include "zend_indent.h"
 
-#if HAVE_LIBREADLINE || HAVE_LIBEDIT
-
 /* {{{ cli_is_valid_code
  */
 typedef enum {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to