Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Dukboot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
dukboot
Dukboot
Commits
cb584e04
Unverified
Commit
cb584e04
authored
May 20, 2017
by
Will Hilton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few small fixes
parent
5643d4be
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
6 deletions
+9
-6
.gitignore
.gitignore
+2
-0
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
Makefile
Makefile
+2
-1
src/app_push_trusted_function.c
src/app_push_trusted_function.c
+1
-1
src/native_import.c
src/native_import.c
+1
-1
test.sh
test.sh
+2
-2
No files found.
.gitignore
View file @
cb584e04
dukboots.exe
dukboots
node_modules
dukboot.exe
makeheaders.exe
.gitlab-ci.yml
View file @
cb584e04
...
...
@@ -15,7 +15,7 @@ compile-for-alpine:
-
mv dukboot dukboot-alpine
artifacts
:
paths
:
-
dukboot
s
-alpine
-
dukboot-alpine
compile-for-ubuntu
:
image
:
ubuntu
...
...
Makefile
View file @
cb584e04
CC
=
gcc
CFLAGS
=
-fopenmp
-I
./lib/duktape
-Os
-pedantic
-std
=
c99
-Wall
-fstrict-aliasing
-fomit-frame-pointer
-D_GNU_SOURCE
LDFLAGS
=
-static
-static-libgcc
-lm
ifeq
($(OS),Windows_NT)
BIN
=
dukboot.exe
...
...
@@ -16,7 +17,7 @@ DEPS = $(wildcard lib/duktape/*.c)
DEPOBJS
=
$(DEPS:.c=.o)
main
:
$(MAKEHEADERS) $(HEADERS) $(DEPOBJS) $(OBJS)
$(CC)
$(CFLAGS)
-o
$(BIN)
$(OBJS)
$(DEPOBJS)
$(LDFLAGS)
-lm
$(CC)
$(CFLAGS)
-o
$(BIN)
$(OBJS)
$(DEPOBJS)
$(LDFLAGS)
$(MAKEHEADERS)
:
makeheaders.c
gcc makeheaders.c
-o
makeheaders
...
...
src/app_push_trusted_function.c
View file @
cb584e04
...
...
@@ -18,7 +18,7 @@ int app_push_trusted_function (duk_context *ctx) {
// Read the file
char
*
message
=
NULL
;
char
*
buffer
=
NULL
;
size_t
bytesRead
=
NULL
;
size_t
bytesRead
=
0
;
duk_int_t
ret
=
c_read_script_file
(
joined_path
,
&
message
,
&
buffer
,
&
bytesRead
);
if
(
ret
)
{
if
(
buffer
!=
NULL
)
free
(
buffer
);
...
...
src/native_import.c
View file @
cb584e04
...
...
@@ -3,7 +3,7 @@
int
native_import
(
duk_context
*
ctx
,
const
char
*
filename
)
{
char
*
message
=
NULL
;
char
*
buffer
=
NULL
;
size_t
bytesRead
=
NULL
;
size_t
bytesRead
=
0
;
duk_int_t
ret
=
c_read_script_file
(
filename
,
&
message
,
&
buffer
,
&
bytesRead
);
if
(
ret
)
{
if
(
message
!=
NULL
)
fprintf
(
stderr
,
"%s
\n
"
,
message
);
...
...
test.sh
View file @
cb584e04
#!/bin/sh
DUKBOOT
S
=
"
${
1
:-
./dukboots
}
"
DUKBOOT
=
"
${
1
:-
./dukboot
}
"
NUM_CORES
=
"
$(
grep
-c
^processor /proc/cpuinfo
)
"
echo
"
$NUM_CORES
cores"
EXPECT_ONE
=
'[12,"index.html"]'
...
...
@@ -8,7 +8,7 @@ for n in $(seq 2 $((NUM_CORES * 1))); do
EXPECT
=
"
$EXPECT
$EXPECT_ONE
"
done
RESULT
=
"
$(
$DUKBOOT
S
example/example.js
)
"
RESULT
=
"
$(
$DUKBOOT
example/example.js
)
"
echo
"
$EXPECT
"
echo
"---"
echo
"
$RESULT
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment