]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/check/check_init.c
Imported to git.
[icculus/xz.git] / src / liblzma / check / check_init.c
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       check_init.c
4 /// \brief      Static initializations for integrity checks
5 //
6 //  This code has been put into the public domain.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "check.h"
15
16
17 extern LZMA_API void
18 lzma_init_check(void)
19 {
20 #ifdef HAVE_SMALL
21         static bool already_initialized = false;
22         if (already_initialized)
23                 return;
24
25 #       ifdef HAVE_CHECK_CRC32
26         lzma_crc32_init();
27 #       endif
28
29 #       ifdef HAVE_CHECK_CRC64
30         lzma_crc64_init();
31 #       endif
32
33         already_initialized = true;
34 #endif
35
36         return;
37 }