mirror of
https://github.com/VirusTotal/yara.git
synced 2026-10-12 02:10:00 +00:00
Tidy #include's (#1769)
- Add assert.h for assert() - Add yara/strutils.h for PRIxXX macros, memmem - Remove unneeded utils.h -> strutils.h dependency - Don't include sys/wait.h on Windows (native)
This commit is contained in:
@@ -27,6 +27,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <yara/arena.h>
|
||||
|
||||
@@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "yara/object.h"
|
||||
#include "yara/scanner.h"
|
||||
#include "yara/stream.h"
|
||||
#include "yara/strutils.h"
|
||||
#include "yara/utils.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define YR_UTILS_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <yara/strutils.h>
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
|
||||
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <yara/globals.h>
|
||||
#include <yara/mem.h>
|
||||
#include <yara/modules.h>
|
||||
#include <yara/strutils.h>
|
||||
|
||||
#include "../crypto.h"
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <yara/modules.h>
|
||||
|
||||
#define MODULE_NAME tests
|
||||
|
||||
@@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <yara/globals.h>
|
||||
#include <yara/mem.h>
|
||||
#include <yara/object.h>
|
||||
#include <yara/strutils.h>
|
||||
#include <yara/utils.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#if defined(USE_FREEBSD_PROC)
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ptrace.h>
|
||||
|
||||
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#if defined(USE_LINUX_PROC)
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
@@ -43,6 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <yara/libyara.h>
|
||||
#include <yara/mem.h>
|
||||
#include <yara/proc.h>
|
||||
#include <yara/strutils.h>
|
||||
|
||||
typedef struct _YR_PROC_INFO
|
||||
{
|
||||
|
||||
@@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <errno.h>
|
||||
// clang-format on
|
||||
|
||||
#include <assert.h>
|
||||
#include <yara/error.h>
|
||||
#include <yara/libyara.h>
|
||||
#include <yara/mem.h>
|
||||
|
||||
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#if defined(USE_WINDOWS_PROC)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <windows.h>
|
||||
#include <yara/error.h>
|
||||
#include <yara/libyara.h>
|
||||
|
||||
@@ -47,6 +47,7 @@ order to avoid confusion with operating system threads.
|
||||
#include <yara/mem.h>
|
||||
#include <yara/re.h>
|
||||
#include <yara/re_lexer.h>
|
||||
#include <yara/strutils.h>
|
||||
#include <yara/threading.h>
|
||||
#include <yara/unaligned.h>
|
||||
#include <yara/utils.h>
|
||||
|
||||
@@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <yara/object.h>
|
||||
#include <yara/proc.h>
|
||||
#include <yara/scanner.h>
|
||||
#include <yara/strutils.h>
|
||||
#include <yara/types.h>
|
||||
|
||||
#include "exception.h"
|
||||
|
||||
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <yara/globals.h>
|
||||
#include <yara/mem.h>
|
||||
#include <yara/sizedstr.h>
|
||||
#include <yara/strutils.h>
|
||||
#include <yara/types.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -30,7 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
#include <yara.h>
|
||||
|
||||
@@ -33,7 +33,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <yara.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user