Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/apache2/modperl_perl_includes.h
$ cat -n /usr/include/apache2/modperl_perl_includes.h 1 /* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MODPERL_PERL_INCLUDES_H 18 #define MODPERL_PERL_INCLUDES_H 19 20 /* header files for Perl */ 21 22 #ifndef PERL_NO_GET_CONTEXT 23 # define PERL_NO_GET_CONTEXT 24 #endif 25 26 #define PERLIO_NOT_STDIO 0 27 28 #include "config.h" 29 30 /* 31 * sizeof(struct PerlInterpreter) changes #ifdef USE_LARGE_FILES 32 * apache-2.0 cannot be compiled with lfs because of sendfile.h 33 * the PERL_CORE optimization is a no-no in this case 34 */ 35 #if defined(USE_ITHREADS) && !defined(USE_LARGE_FILES) 36 # define PERL_CORE 37 #endif 38 39 #ifdef MP_SOURCE_SCAN 40 /* XXX: C::Scan does not properly remove __attribute__ within 41 * function prototypes; so we just rip them all out via cpp 42 */ 43 # undef __attribute__ 44 # define __attribute__(arg) 45 46 # ifdef MP_SOURCE_SCAN_NEED_ITHREADS 47 /* just need to have pTHX_ defined for proper prototypes */ 48 # define USE_ITHREADS 49 # endif 50 #endif 51 52 #ifdef WIN32 53 # define uid_t perl_uid_t 54 # define gid_t perl_gid_t 55 # ifdef exit 56 # undef exit 57 # endif 58 #endif 59 60 /* needed starting from 5.8.2 to access the PERL_HASH_INTERNAL macro 61 * in hv.h. we use it in modperl_util.c */ 62 #define PERL_HASH_INTERNAL_ACCESS 63 64 #include "EXTERN.h" 65 #include "perl.h" 66 #include "XSUB.h" 67 68 #if defined(WIN32) && defined(USE_LARGE_FILES) 69 # ifdef malloc 70 # undef malloc 71 # endif 72 # ifdef free 73 # undef free 74 # endif 75 #endif 76 77 #include "modperl_perl_unembed.h" 78 79 /* avoiding -Wall warning */ 80 81 #undef dNOOP 82 #define dNOOP extern int __attribute__ ((unused)) Perl___notused___modperl 83 84 #ifndef G_METHOD 85 # define G_METHOD 64 86 #endif 87 88 #ifndef PERL_MAGIC_tied 89 # define PERL_MAGIC_tied 'P' 90 #endif 91 92 #ifndef PERL_MAGIC_tiedscalar 93 # define PERL_MAGIC_tiedscalar 'q' 94 #endif 95 96 #ifndef PERL_MAGIC_ext 97 # define PERL_MAGIC_ext '~' 98 #endif 99 100 #if defined(__APPLE__) && !defined(PERL_CORE) && !defined(environ) 101 # include
102 # define environ (*_NSGetEnviron()) 103 #endif 104 105 /* sv_copypv was added in perl 5.7.3 */ 106 #ifndef sv_copypv 107 # define sv_copypv(dsv, ssv) \ 108 STMT_START { \ 109 STRLEN len; \ 110 char *s; \ 111 s = SvPV(ssv, len); \ 112 sv_setpvn(dsv, s, len); \ 113 if (SvUTF8(ssv)) { \ 114 SvUTF8_on(dsv); \ 115 } \ 116 else { \ 117 SvUTF8_off(dsv); \ 118 } \ 119 } STMT_END 120 #endif 121 122 123 /* perl bug workaround: with USE_ITHREADS perl leaks pthread_key_t on 124 * every reload of libperl.{a,so} (it's allocated on the very first 125 * perl_alloc() and never freed). This becomes a problem on apache 126 * restart: if the OS limit is 1024, 1024 restarts later things will 127 * start crashing */ 128 /* XXX: once and if it's fixed in perl, we need to disable it for the 129 * versions that have it fixed, otherwise it'll crash because it'll be 130 * freed twice */ 131 #ifdef USE_ITHREADS 132 #define MP_PERL_FREE_THREAD_KEY_WORKAROUND \ 133 if (PL_curinterp) { \ 134 FREE_THREAD_KEY; \ 135 PL_curinterp = NULL; \ 136 } 137 #else 138 #define MP_PERL_FREE_THREAD_KEY_WORKAROUND 139 #endif 140 141 #endif /* MODPERL_PERL_INCLUDES_H */ 142 143 /* 144 * Local Variables: 145 * c-basic-offset: 4 146 * indent-tabs-mode: nil 147 * End: 148 */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™