tu58fs - PDP-11 file sharing with TU58 tape emulator

Torfinn Ingolfsen tingox at gmail.com
Mon Jan 23 18:19:46 CST 2017


On Fri, Jan 20, 2017 at 8:51 PM, Jörg Hoppe <j_hoppe at t-online.de> wrote:
>
> If you like to have a look (and play beta tester):
>
> Docs on http://retrocmp.com/tools/tu58fs
> C sources and makefile on https://github.com/j-hoppe/tu58fs

FWIW, It doesn't compile on FreeBSD (yes, I do not know if it is supposed to)
tingo at kg-core1$ gmake
cc -I. -c -UWINCOMM  -ggdb3 -O0 -m64 main.c -o freebsd-amd64/main.o
cc -I. -c -UWINCOMM  -ggdb3 -O0 -m64 getopt2.c -o freebsd-amd64/getopt2.o
getopt2.c:228:20: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
getopt2.c:228:20: note: place parentheses around the assignment to
silence this warning
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                          ^
                    (                              )
getopt2.c:228:20: note: use '==' to turn this assignment into an
equality comparison
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                          ^
                          ==
getopt2.c:364:21: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
                for (i = 0; odesc = _this->option_descrs[i]; i++)
                            ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
getopt2.c:364:21: note: place parentheses around the assignment to
silence this warning
                for (i = 0; odesc = _this->option_descrs[i]; i++)
                                  ^
                            (                              )
getopt2.c:364:21: note: use '==' to turn this assignment into an
equality comparison
                for (i = 0; odesc = _this->option_descrs[i]; i++)
                                  ^
                                  ==
getopt2.c:439:20: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
getopt2.c:439:20: note: place parentheses around the assignment to
silence this warning
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                          ^
                    (                              )
getopt2.c:439:20: note: use '==' to turn this assignment into an
equality comparison
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                          ^
                          ==
getopt2.c:646:16: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
        for (i = 0; s = odesc->fix_args[i]; i++) {
                    ~~^~~~~~~~~~~~~~~~~~~~
getopt2.c:646:16: note: place parentheses around the assignment to
silence this warning
        for (i = 0; s = odesc->fix_args[i]; i++) {
                      ^
                    (                     )
getopt2.c:646:16: note: use '==' to turn this assignment into an
equality comparison
        for (i = 0; s = odesc->fix_args[i]; i++) {
                      ^
                      ==
getopt2.c:651:16: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
        for (i = 0; s = odesc->var_args[i]; i++) {
                    ~~^~~~~~~~~~~~~~~~~~~~
getopt2.c:651:16: note: place parentheses around the assignment to
silence this warning
        for (i = 0; s = odesc->var_args[i]; i++) {
                      ^
                    (                     )
getopt2.c:651:16: note: use '==' to turn this assignment into an
equality comparison
        for (i = 0; s = odesc->var_args[i]; i++) {
                      ^
                      ==
getopt2.c:751:20: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
        for (i = 0; odesc = _this->option_descrs[i]; i++) {
                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
getopt2.c:751:20: note: place parentheses around the assignment to
silence this warning
        for (i = 0; odesc = _this->option_descrs[i]; i++) {
                          ^
                    (                              )
getopt2.c:751:20: note: use '==' to turn this assignment into an
equality comparison
        for (i = 0; odesc = _this->option_descrs[i]; i++) {
                          ^
                          ==
getopt2.c:754:26: warning: the value of the size argument in 'strncat'
is too large, might lead to a buffer overflow [-Wstrncat-size]
                strncat(linebuff, " ", sizeof(linebuff));
                                       ^~~~~~~~~~~~~~~~
getopt2.c:754:26: note: change the argument to be the free space in
the destination buffer minus the terminating null byte
                strncat(linebuff, " ", sizeof(linebuff));
                                       ^~~~~~~~~~~~~~~~
                                       sizeof(linebuff) - strlen(linebuff) - 1
getopt2.c:760:26: warning: the value of the size argument in 'strncat'
is too large, might lead to a buffer overflow [-Wstrncat-size]
                strncat(linebuff, " ", sizeof(linebuff));
                                       ^~~~~~~~~~~~~~~~
getopt2.c:760:26: note: change the argument to be the free space in
the destination buffer minus the terminating null byte
                strncat(linebuff, " ", sizeof(linebuff));
                                       ^~~~~~~~~~~~~~~~
                                       sizeof(linebuff) - strlen(linebuff) - 1
getopt2.c:774:20: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
getopt2.c:774:20: note: place parentheses around the assignment to
silence this warning
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                          ^
                    (                              )
getopt2.c:774:20: note: use '==' to turn this assignment into an
equality comparison
        for (i = 0; odesc = _this->option_descrs[i]; i++)
                          ^
                          ==
9 warnings generated.
cc -I. -c -UWINCOMM  -ggdb3 -O0 -m64 tu58drive.c -o freebsd-amd64/tu58drive.o
cc -I. -c -UWINCOMM  -ggdb3 -O0 -m64 image.c -o freebsd-amd64/image.o
image.c:99:9: warning: expression result unused [-Wunused-value]
        _this->blocksize;
        ~~~~~  ^~~~~~~~~
image.c:240:1: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
image.c:294:11: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
                if (res = hostdir_load(_this->hostdir,
_this->autosizing, allowcreate, &filecreated)) {

~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:294:11: note: place parentheses around the assignment to
silence this warning
                if (res = hostdir_load(_this->hostdir,
_this->autosizing, allowcreate, &filecreated)) {
                        ^
                    (
                             )
image.c:294:11: note: use '==' to turn this assignment into an
equality comparison
                if (res = hostdir_load(_this->hostdir,
_this->autosizing, allowcreate, &filecreated)) {
                        ^
                        ==
image.c:301:11: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
                if (res = image_hostfile_open(_this, allowcreate,
&filecreated)) {
                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:301:11: note: place parentheses around the assignment to
silence this warning
                if (res = image_hostfile_open(_this, allowcreate,
&filecreated)) {
                        ^
                    (                                                          )
image.c:301:11: note: use '==' to turn this assignment into an
equality comparison
                if (res = image_hostfile_open(_this, allowcreate,
&filecreated)) {
                        ^
                        ==
image.c:469:11: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
                if (res = hostdir_save(_this->hostdir)) {
                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:469:11: note: place parentheses around the assignment to
silence this warning
                if (res = hostdir_save(_this->hostdir)) {
                        ^
                    (                                 )
image.c:469:11: note: use '==' to turn this assignment into an
equality comparison
                if (res = hostdir_save(_this->hostdir)) {
                        ^
                        ==
image.c:474:11: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
                if (res = image_hostfile_save(_this)) {
                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c:474:11: note: place parentheses around the assignment to
silence this warning
                if (res = image_hostfile_save(_this)) {
                        ^
                    (                               )
image.c:474:11: note: use '==' to turn this assignment into an
equality comparison
                if (res = image_hostfile_save(_this)) {
                        ^
                        ==
image.c:502:1: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
7 warnings generated.
cc -I. -c -UWINCOMM  -ggdb3 -O0 -m64 serial.c -o freebsd-amd64/serial.o
serial.c:443:44: error: use of undeclared identifier 'B3000000'
    static int32_t baudlist[] = { 3000000, B3000000,
                                           ^
serial.c:444:16: error: use of undeclared identifier 'B2500000'
                                  2500000, B2500000,
                                           ^
serial.c:445:16: error: use of undeclared identifier 'B2000000'
                                  2000000, B2000000,
                                           ^
serial.c:446:16: error: use of undeclared identifier 'B1500000'
                                  1500000, B1500000,
                                           ^
serial.c:447:16: error: use of undeclared identifier 'B1152000'
                                  1152000, B1152000,
                                           ^
serial.c:448:16: error: use of undeclared identifier 'B1000000'
                                  1000000, B1000000,
                                           ^
serial.c:450:16: error: use of undeclared identifier 'B576000'
                                  576000,  B576000,
                                           ^
serial.c:451:16: error: use of undeclared identifier 'B500000'
                                  500000,  B500000,
                                           ^
serial.c:571:10: error: use of undeclared identifier 'IUCLC'
                       IUCLC  | IXANY  | PARMRK  | IGNPAR );
                       ^
serial.c:575:33: error: use of undeclared identifier 'OLCUC'
    line.c_oflag &= ~( OPOST  | OLCUC | OCRNL | ONLCR | ONOCR |
                                ^
serial.c:576:19: error: use of undeclared identifier 'OFILL'
                       ONLRET | OFILL | CRDLY | NLDLY | BSDLY |
                                ^
serial.c:576:27: error: use of undeclared identifier 'CRDLY'
                       ONLRET | OFILL | CRDLY | NLDLY | BSDLY |
                                        ^
serial.c:576:35: error: use of undeclared identifier 'NLDLY'
                       ONLRET | OFILL | CRDLY | NLDLY | BSDLY |
                                                ^
serial.c:576:43: error: use of undeclared identifier 'BSDLY'
                       ONLRET | OFILL | CRDLY | NLDLY | BSDLY |
                                                        ^
serial.c:577:19: error: use of undeclared identifier 'VTDLY'
                       TABDLY | VTDLY | FFDLY | OFDEL );
                                ^
serial.c:577:27: error: use of undeclared identifier 'FFDLY'
                       TABDLY | VTDLY | FFDLY | OFDEL );
                                        ^
serial.c:577:35: error: use of undeclared identifier 'OFDEL'
                       TABDLY | VTDLY | FFDLY | OFDEL );
                                                ^
serial.c:581:24: error: use of undeclared identifier 'CBAUD'
    line.c_cflag &= ~( CBAUD  | CSIZE | CSTOPB  | PARENB | PARODD |
                       ^
18 errors generated.
gmake: *** [makefile:63: freebsd-amd64/serial.o] Error 1
The only change I made was OBJDIR= in the makefile.

This on
tingo at kg-core1$ uname -a
FreeBSD kg-core1.kg4.no 10.3-STABLE FreeBSD 10.3-STABLE #0 r310083:
Wed Dec 14 21:00:13 CET 2016
root at kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

HTH
-- 
Regards,
Torfinn Ingolfsen


More information about the cctalk mailing list