~ubuntu-branches/ubuntu/lucid/php5/lucid

« back to all changes in this revision

Viewing changes to Zend/zend_extensions.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-03-16 09:09:50 UTC
  • mfrom: (1.1.18 upstream) (0.3.10 sid)
  • Revision ID: james.westby@ubuntu.com-20100316090950-e36m0pzranoixifd
Tags: 5.3.2-1ubuntu1
* Merge from debian unstable: 
  - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions already in
      universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
  - Dropped debian/patches/libedit_is_editline.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
   +----------------------------------------------------------------------+
3
3
   | Zend Engine                                                          |
4
4
   +----------------------------------------------------------------------+
5
 
   | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
 
5
   | Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
6
6
   +----------------------------------------------------------------------+
7
7
   | This source file is subject to version 2.00 of the Zend license,     |
8
8
   | that is bundled with this package in the file LICENSE, and is        | 
17
17
   +----------------------------------------------------------------------+
18
18
*/
19
19
 
20
 
/* $Id: zend_extensions.c 286859 2009-08-06 01:33:54Z scottmac $ */
 
20
/* $Id: zend_extensions.c 294505 2010-02-04 09:13:14Z pajoye $ */
21
21
 
22
22
#include "zend_extensions.h"
23
23
 
35
35
        if (!handle) {
36
36
#ifndef ZEND_WIN32
37
37
                fprintf(stderr, "Failed loading %s:  %s\n", path, DL_ERROR());
 
38
/* See http://support.microsoft.com/kb/190351 */
 
39
#ifdef PHP_WIN32
 
40
                fflush(stderr);
 
41
#endif
38
42
#else
39
43
                fprintf(stderr, "Failed loading %s\n", path);
40
44
#endif
51
55
        }
52
56
        if (!extension_version_info || !new_extension) {
53
57
                fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
 
58
/* See http://support.microsoft.com/kb/190351 */
 
59
#ifdef PHP_WIN32
 
60
                fflush(stderr);
 
61
#endif
54
62
                DL_UNLOAD(handle);
55
63
                return FAILURE;
56
64
        }
64
72
                                        new_extension->name,
65
73
                                        extension_version_info->zend_extension_api_no,
66
74
                                        ZEND_EXTENSION_API_NO);
 
75
/* See http://support.microsoft.com/kb/190351 */
 
76
#ifdef PHP_WIN32
 
77
                        fflush(stderr);
 
78
#endif
67
79
                        DL_UNLOAD(handle);
68
80
                        return FAILURE;
69
81
                } else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
76
88
                                        new_extension->author,
77
89
                                        new_extension->URL,
78
90
                                        new_extension->name);
 
91
/* See http://support.microsoft.com/kb/190351 */
 
92
#ifdef PHP_WIN32
 
93
                        fflush(stderr);
 
94
#endif
79
95
                        DL_UNLOAD(handle);
80
96
                        return FAILURE;
81
97
                }
83
99
                   (!new_extension->build_id_check || new_extension->build_id_check(ZEND_EXTENSION_BUILD_ID) != SUCCESS)) {
84
100
                fprintf(stderr, "Cannot load %s - it was built with configuration %s, whereas running engine is %s\n",
85
101
                                        new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID);
 
102
/* See http://support.microsoft.com/kb/190351 */
 
103
#ifdef PHP_WIN32
 
104
                fflush(stderr);
 
105
#endif
86
106
                DL_UNLOAD(handle);
87
107
                return FAILURE;
88
108
        }
90
110
        return zend_register_extension(new_extension, handle);
91
111
#else
92
112
        fprintf(stderr, "Extensions are not supported on this platform.\n");
 
113
/* See http://support.microsoft.com/kb/190351 */
 
114
#ifdef PHP_WIN32
 
115
        fflush(stderr);
 
116
#endif
93
117
        return FAILURE;
94
118
#endif
95
119
}