Switch from C headers to C++ headers.

This CL makes the following substitutions.

* assert.h -> cassert
* math.h -> cmath
* stdarg.h -> cstdarg
* stdio.h -> cstdio
* stdlib.h -> cstdlib
* string.h -> cstring

stddef.h and stdint.h are not migrated to C++ headers.

PiperOrigin-RevId: 309074805
This commit is contained in:
Victor Costan 2020-04-29 19:32:47 +00:00
parent 251d935d50
commit 5417da69b7
8 changed files with 19 additions and 19 deletions

View File

@ -26,7 +26,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cstddef>
#include <stddef.h>
#include <cstring>
#include "snappy-sinksource.h"

View File

@ -35,15 +35,14 @@
#include "config.h"
#endif
#include <cstdint>
#include <stdint.h>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <limits>
#include <string>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif

View File

@ -31,14 +31,13 @@
#ifndef THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_TEST_H_
#define THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_TEST_H_
#include <cstdarg>
#include <cstdio>
#include <iostream>
#include <string>
#include "snappy-stubs-internal.h"
#include <stdio.h>
#include <stdarg.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif

View File

@ -68,9 +68,8 @@
#include <immintrin.h>
#endif
#include <stdio.h>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>

View File

@ -39,8 +39,9 @@
#ifndef THIRD_PARTY_SNAPPY_SNAPPY_H__
#define THIRD_PARTY_SNAPPY_SNAPPY_H__
#include <cstddef>
#include <cstdint>
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "snappy-stubs-public.h"

View File

@ -28,9 +28,10 @@
//
// libFuzzer harness for fuzzing snappy compression code.
#include <stddef.h>
#include <stdint.h>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <string>
#include "snappy.h"

View File

@ -28,9 +28,10 @@
//
// libFuzzer harness for fuzzing snappy's decompression code.
#include <stddef.h>
#include <stdint.h>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <string>
#include "snappy.h"

View File

@ -26,8 +26,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <math.h>
#include <stdlib.h>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <random>