Skip to content
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

NetBSD support #13

Open
larsbrinkhoff opened this issue Jul 24, 2021 · 1 comment
Open

NetBSD support #13

larsbrinkhoff opened this issue Jul 24, 2021 · 1 comment

Comments

@larsbrinkhoff
Copy link
Collaborator

larsbrinkhoff commented Jul 24, 2021

@Rhialto reported in PDP-10/its#2055 (comment):

[...]
Stuff mostly works on NetBSD :) Although in tools/tapeutils I had to add a bit:

+ifeq ($(UNAME),NetBSD)
+       LIBS=-lcompat
+endif
@Rhialto
Copy link

Rhialto commented Nov 22, 2022

I tried compiling this version directly on NetBSD, and the compiler complains about rexec():

cc -g -Wall   -c -o tapeio.o tapeio.c
tapeio.c: In function 'opentape':
tapeio.c:297:28: warning: implicit declaration of function 'rexec'; did you mean 'exect'? [-Wimplicit-function-declaration]
       if ((mtape->tapefd = rexec (&p, htons (512), user, NULL, "/etc/rmt",
                            ^~~~~
                            exect

The way this is "handled" for some operating systems (simply omitting this line) isn't really useful and won't work because mtape->tapefd is left uninitialized but is used already a few lines later. Nasal demons will ensue.

Further complains are

 read20.c:558:16: warning: implicit declaration of function 're_exec'; did you mean 'regexec'? [-Wimplicit-function-declaration]
   if ((match = re_exec(topsname)) == -1)
                ^~~~~~~
                regexec
cc -g  read20.o tapeio.o   -o read20
ld: read20.o: in function `expmatch':
/mnt/vol1/rhialto/cvs/other/tapeutils/read20.c:558: undefined reference to `re_exec'

Defining the replacement re_exec() etc functions near the top of read20.c also for NetBSD would be good; better than needing -lcompat for that.

Same for rexec(3) which has been replaced by rcmd(3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants