Repository: ossrs/srs
File: trunk/auto/auto_headers.sh (Shell)

Code before:
    srs_define_macro "SRS_GPERF" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_MC == YES ]]; then
    srs_define_macro "SRS_GPERF_MC" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_MC" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_MD == YES ]]; then
    srs_define_macro "SRS_GPERF_MD" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_MD" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_MP == YES ]]; then
    srs_define_macro "SRS_GPERF_MP" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_MP" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_CP == YES ]]; then
    srs_define_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H
fi
if [ $SRS_SANITIZER_USE_API == YES ]; then
    srs_define_macro "SRS_SANITIZER_API" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_SANITIZER_API" $SRS_AUTO_HEADERS_H
fi

#####################################################################################
# for embeded.
#####################################################################################
# for log level compile settings
if [[ $SRS_LOG_VERBOSE == YES ]]; then
    srs_define_macro "SRS_VERBOSE" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_VERBOSE" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_LOG_INFO == YES ]]; then
    srs_define_macro "SRS_INFO" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_INFO" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_LOG_TRACE == YES ]]; then
    srs_define_macro "SRS_TRACE" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_TRACE" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_SINGLE_THREAD == YES ]]; then
    srs_define_macro "SRS_SINGLE_THREAD" $SRS_AUTO_HEADERS_H

Review comment (security):
These two macro definitions are consistent, which makes it easier to search. Change it to `SRS_SANITIZER_USE_API`.

`TRANS_BY_GPT3`

Code after:
else
    srs_undefine_macro "SRS_GPERF_MC" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_MD == YES ]]; then
    srs_define_macro "SRS_GPERF_MD" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_MD" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_MP == YES ]]; then
    srs_define_macro "SRS_GPERF_MP" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_MP" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_GPERF_CP == YES ]]; then
    srs_define_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H
fi
if [ $SRS_SANITIZER_LOG == YES ]; then
    srs_define_macro "SRS_SANITIZER_LOG" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_SANITIZER_LOG" $SRS_AUTO_HEADERS_H
fi

#####################################################################################
# for embeded.
#####################################################################################
# for log level compile settings
if [[ $SRS_LOG_VERBOSE == YES ]]; then
    srs_define_macro "SRS_VERBOSE" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_VERBOSE" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_LOG_INFO == YES ]]; then
    srs_define_macro "SRS_INFO" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_INFO" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_LOG_TRACE == YES ]]; then
    srs_define_macro "SRS_TRACE" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_TRACE" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_SINGLE_THREAD == YES ]]; then
    srs_define_macro "SRS_SINGLE_THREAD" $SRS_AUTO_HEADERS_H
else
    srs_undefine_macro "SRS_SINGLE_THREAD" $SRS_AUTO_HEADERS_H
fi
if [[ $SRS_LOG_LEVEL_V2 == YES ]]; then
    srs_define_macro "SRS_LOG_LEVEL_V2" $SRS_AUTO_HEADERS_H
else