Skip to content

Commit

Permalink
added -fpermissive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Sep 2, 2024
1 parent 661ff74 commit c1246d7
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tinydnssec-c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: build_dq
run: cd main/tinydnssec-x/dq-20161210; make
- name: build_curvedns
run: cd main/tinydnssec-x/curvedns-0.88; env CPPFLAGS="-I/opt/homebrew/Cellar/libev/4.33/include -I/opt/homebrew/Cellar/libsodium/1.0.19/include/sodium" LDFLAGS="-L/opt/homebrew/Cellar/libev/4.33/lib -L/opt/homebrew/Cellar/libsodium/1.0.19/lib" ./default.configure; make
run: if [ "${OS}" = "ubuntu-latest" ] ; then cd main/tinydnssec-x/curvedns-0.88; env CPPFLAGS="-I/opt/homebrew/Cellar/libev/4.33/include -I/opt/homebrew/Cellar/libsodium/1.0.19/include/sodium" LDFLAGS="-L/opt/homebrew/Cellar/libev/4.33/lib -L/opt/homebrew/Cellar/libsodium/1.0.19/lib" ./default.configure; make; fi
env:
OS: ${{ matrix.host }}

4 changes: 2 additions & 2 deletions tinydnssec-x/curvedns-0.88/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ case "$host" in
;;
*-*-linux*)
CPPFLAGS="$CPPFLAGS -DLINUX -I/usr/include/sodium"
CFLAGS="$CFLAGS -g -O4 -Wall -fPIC -fpie"
CFLAGS="$CFLAGS -g -O4 -Wall -fPIC -fpie -fpermissive"
LDFLAGS="$LDFLAGS -pie"
SYSTEM=Linux
;;
Expand All @@ -61,7 +61,7 @@ case "$host" in
*-*-darwin*)
CPPFLAGS="$CPPFLAGS -DDARWIN -I/opt/local/include -I/opt/local/include/qmail -I/opt/local/include/sodium"
CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/local/include/sodium"
CFLAGS="$CFLAGS -g -O3 -Wall"
CFLAGS="$CFLAGS -g -O3 -Wall -fpermissive"
LDFLAGS="$LDFLAGS -L/opt/local/lib -L/usr/local/lib"
SYSTEM=Darwin
;;
Expand Down
12 changes: 6 additions & 6 deletions tinydnssec-x/curvedns-0.88/nacl/okcompilers/c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
gcc -m64 -fomit-frame-pointer
gcc -m64 -O -fomit-frame-pointer
gcc -m64 -O3 -fomit-frame-pointer -funroll-loops
gcc -m32 -fomit-frame-pointer
gcc -m32 -O -fomit-frame-pointer
gcc -m32 -O3 -fomit-frame-pointer -funroll-loops
gcc -m64 -fomit-frame-pointer -fpermissive
gcc -m64 -O -fomit-frame-pointer -fpermissive
gcc -m64 -O3 -fomit-frame-pointer -funroll-loops -fpermissive
gcc -m32 -fomit-frame-pointer -fpermissive
gcc -m32 -O -fomit-frame-pointer -fpermissive
gcc -m32 -O3 -fomit-frame-pointer -funroll-loops -fpermissive
spu-gcc -mstdmain -march=cell -O -fomit-frame-pointer -Drandom=rand -Dsrandom=srand
spu-gcc -mstdmain -march=cell -O3 -funroll-loops -fomit-frame-pointer -Drandom=rand -Dsrandom=srand
2 changes: 2 additions & 0 deletions tinydnssec-x/doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,5 @@ Release 1.1 Start 11/04/2017
62. dnstxt.c: fixed infinite loop
- 12/02/2024
63. added instcheck-tinydnssec man page
- 02/09/2024
64. fixed compiler warnings for gcc14
2 changes: 0 additions & 2 deletions tinydnssec-x/dq-20161210/dq/SOURCES
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ dns_resolve
dns_sortip
dns_transmit
dns_verbosity
dq
dqcache
droproot
e
env
Expand Down
30 changes: 20 additions & 10 deletions tinydnssec-x/dq-20161210/dq/dns_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,29 @@ long long dns_packet_getname(const unsigned char *buf, long long len, long long
long long namelen = 0;

for (;;) {
if (pos >= len) goto PROTO; ch = buf[pos++];
if (pos >= len) goto PROTO;
ch = buf[pos++];
if (++loop >= 1000) goto PROTO;

if (state > 0) {
if (namelen + 1 > sizeof name) goto PROTO; name[namelen++] = ch;
if (namelen + 1 > sizeof name) goto PROTO;
name[namelen++] = ch;
--state;
}
else {
while (ch >= 192) {
where = ch; where -= 192; where <<= 8;
if (pos >= len) goto PROTO; ch = buf[pos++];
if (pos >= len) goto PROTO;
ch = buf[pos++];
if (!firstcompress) firstcompress = pos;
pos = where + ch;
if (pos >= len) goto PROTO; ch = buf[pos++];
if (pos >= len) goto PROTO;
ch = buf[pos++];
if (++loop >= 1000) goto PROTO;
}
if (ch >= 64) goto PROTO;
if (namelen + 1 > sizeof name) goto PROTO; name[namelen++] = ch;
if (namelen + 1 > sizeof name) goto PROTO;
name[namelen++] = ch;
if (!ch) break;
state = ch;
}
Expand Down Expand Up @@ -85,24 +90,29 @@ long long dns_packet_getname_static(const unsigned char *buf, long long len, lon
byte_zero(name, 256);

for (;;) {
if (pos >= len) goto PROTO; ch = buf[pos++];
if (pos >= len) goto PROTO;
ch = buf[pos++];
if (++loop >= 1000) goto PROTO;

if (state > 0) {
if (namelen + 1 > 255) goto PROTO; name[namelen++] = ch;
if (namelen + 1 > 255) goto PROTO;
name[namelen++] = ch;
--state;
}
else {
while (ch >= 192) {
where = ch; where -= 192; where <<= 8;
if (pos >= len) goto PROTO; ch = buf[pos++];
if (pos >= len) goto PROTO;
ch = buf[pos++];
if (!firstcompress) firstcompress = pos;
pos = where + ch;
if (pos >= len) goto PROTO; ch = buf[pos++];
if (pos >= len) goto PROTO;
ch = buf[pos++];
if (++loop >= 1000) goto PROTO;
}
if (ch >= 64) goto PROTO;
if (namelen + 1 > 255) goto PROTO; name[namelen++] = ch;
if (namelen + 1 > 255) goto PROTO;
name[namelen++] = ch;
if (!ch) break;
state = ch;
}
Expand Down
3 changes: 2 additions & 1 deletion tinydnssec-x/dq-20161210/dq/dqcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static void doit(void) {
u[j].io = io + iolen++;
query_io(&u[j].q,u[j].io,&deadline);
}
for (j = 0;j < MAXTCP;++j)
for (j = 0;j < MAXTCP;++j) {
if (t[j].active) {
t[j].io = io + iolen++;
if (t[j].state == 0)
Expand All @@ -379,6 +379,7 @@ static void doit(void) {
t[j].io->events = (t[j].state > 0) ? POLLIN : POLLOUT;
}
}
}

timeout = deadline - stamp;
if (timeout < 0) timeout = 10;
Expand Down
5 changes: 0 additions & 5 deletions tinydnssec-x/dq-20161210/sysdep/direntry.h-dirent.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

int main(int argc,char **argv){

DIR *dir;
struct dirent *d;

dir=0; d = 0;

printf("/* Public domain. */\n\n");
printf("#ifndef _DIRENTRY_H____\n");
printf("#define _DIRENTRY_H____\n\n");
Expand Down
2 changes: 1 addition & 1 deletion tinydnssec-x/dq-20161210/sysdep/hasipv6.h-yes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

int main() {

int s, r;
int s;
struct sockaddr_in6 sa;
int opt = 1;

Expand Down

0 comments on commit c1246d7

Please sign in to comment.