diff options
author | Fredrik Gustafsson <[email protected]> | 2013-10-10 14:53:35 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-10-10 14:53:35 +0200 |
commit | 5e1f01cea37a483327d68a76ef4b01af4a78f359 (patch) | |
tree | c69e798917cc736ae97c1c55d0f0e4009b00f62b /lib/inets/test/httpd_basic_SUITE_data | |
parent | f166e4e4e6ae34e5760c572cd22ecfca80e22724 (diff) | |
parent | 02743d4f8df0ddb6ef7f9dc93097e5f62655483b (diff) | |
download | otp-5e1f01cea37a483327d68a76ef4b01af4a78f359.tar.gz otp-5e1f01cea37a483327d68a76ef4b01af4a78f359.tar.bz2 otp-5e1f01cea37a483327d68a76ef4b01af4a78f359.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/inets/test/httpd_basic_SUITE_data')
-rw-r--r-- | lib/inets/test/httpd_basic_SUITE_data/Makefile.src | 14 | ||||
-rw-r--r-- | lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c | 26 |
2 files changed, 40 insertions, 0 deletions
diff --git a/lib/inets/test/httpd_basic_SUITE_data/Makefile.src b/lib/inets/test/httpd_basic_SUITE_data/Makefile.src new file mode 100644 index 0000000000..9da2ed583f --- /dev/null +++ b/lib/inets/test/httpd_basic_SUITE_data/Makefile.src @@ -0,0 +1,14 @@ +CC = @CC@ +LD = @LD@ +CFLAGS = @CFLAGS@ -I@erl_include@ @DEFS@ +CROSSLDFLAGS = @CROSSLDFLAGS@ + +PROGS = cgi_sleep@exe@ + +all: $(PROGS) + +cgi_sleep@exe@: cgi_sleep@obj@ + $(LD) $(CROSSLDFLAGS) -o cgi_sleep cgi_sleep@obj@ @LIBS@ + +cgi_sleep@obj@: cgi_sleep.c + $(CC) -c -o cgi_sleep@obj@ $(CFLAGS) cgi_sleep.c diff --git a/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c b/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c new file mode 100644 index 0000000000..126bb23987 --- /dev/null +++ b/lib/inets/test/httpd_basic_SUITE_data/cgi_sleep.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <stdio.h> + +#ifdef __WIN32__ +#include <windows.h> +#include <fcntl.h> +#include <io.h> +#else +#include <unistd.h> +#endif + +int main(void) +{ + unsigned int seconds = 10; + +#ifdef __WIN32__ + Sleep(seconds * 1000); + _setmode(_fileno(stdout), _O_BINARY); +#else + sleep(seconds); +#endif + + printf("Content-type: text/plain\r\n\r\n"); + printf("Slept for %u seconds.\r\n", seconds); + exit(EXIT_SUCCESS); +} |