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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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