Skip to content

Remove excess headers from report_result.h #12929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/emscripten_set_timeout.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <emscripten/html5.h>
#include <emscripten/em_asm.h>
#include <assert.h>

int func1Executed = 0;
Expand Down
1 change: 1 addition & 0 deletions tests/emscripten_set_timeout_loop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <emscripten/html5.h>
#include <emscripten/em_asm.h>
#include <assert.h>

double previousSetTimeouTime = 0;
Expand Down
1 change: 1 addition & 0 deletions tests/pthread/emscripten_thread_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <emscripten.h>
#include <emscripten/threading.h>
#include <assert.h>
#include <stdio.h>

void Sleep(double msecs)
{
Expand Down
1 change: 1 addition & 0 deletions tests/pthread/test_pthread_create_pthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <emscripten.h>
#include <emscripten/threading.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

volatile int result = 0;
Expand Down
1 change: 1 addition & 0 deletions tests/pthread/test_pthread_volatile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// found in the LICENSE file.

#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include <emscripten.h>
#include <emscripten/threading.h>
Expand Down
8 changes: 4 additions & 4 deletions tests/report_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
#ifndef REPORT_RESULT_H_
#define REPORT_RESULT_H_

#include <stdio.h>

#ifdef __EMSCRIPTEN__

#include <emscripten.h>

#ifdef __cplusplus
extern "C" {
#endif

void _ReportResult(int result, int sync);
void _MaybeReportResult(int result, int sync);

#ifdef __cplusplus
}
#endif
Expand All @@ -40,7 +38,9 @@ void _MaybeReportResult(int result, int sync);

#else

#include <stdio.h>
#include <stdlib.h>

#define REPORT_RESULT(result) \
do { \
printf("result: %d\n", result); \
Expand Down
1 change: 1 addition & 0 deletions tests/request_animation_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

// Test RAF is actually used (and not setTimeout etc.)

#include <stdio.h>
#include <emscripten.h>

EMSCRIPTEN_KEEPALIVE extern "C" void good() {
Expand Down
4 changes: 4 additions & 0 deletions tests/sdl2_net_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

#include "SDL_net.h"

#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif

typedef enum {
MSG_READ,
MSG_WRITE
Expand Down
1 change: 1 addition & 0 deletions tests/sdl_stb_image_cleanup.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL_image.h>
#include <emscripten.h>

Expand Down
1 change: 1 addition & 0 deletions tests/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3499,6 +3499,7 @@ def do_run(src, expected_output):
};
''')
src += r'''
#include <emscripten/em_asm.h>
int main() {
test_main();
EM_ASM({
Expand Down