Deutsch English Français Italiano |
<eli$1711071544@qz.little-neck.ny.us> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder6.news.weretis.net!feeder.erje.net!2.us.feeder.erje.net!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!qz!not-for-mail From: Eli the Bearded <*@eli.users.panix.com> Newsgroups: news.software.readers Subject: Re: Android newsreader Date: Tue, 7 Nov 2017 20:46:04 +0000 (UTC) Organization: Some absurd concept Lines: 97 Message-ID: <eli$1711071544@qz.little-neck.ny.us> References: <f50lu0Fhh5oU3@mid.individual.net> <eli$1710231553@qz.little-neck.ny.us> <f573oiF3kvnU1@mid.individual.net> <eli$1710232113@qz.little-neck.ny.us> NNTP-Posting-Host: panix5.panix.com X-Trace: reader2.panix.com 1510087564 7757 166.84.1.5 (7 Nov 2017 20:46:04 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 7 Nov 2017 20:46:04 +0000 (UTC) X-Liz: It's actually happened, the entire Internet is a massive game of Redcode X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix X-US-Congress: Moronic Fucks. X-Attribution: EtB XFrom: is a real address Encrypted: double rot-13 User-Agent: Vectrex rn 2.1 (beta) X-Comments: "'Pray that I don't alter the bargain further.' Welcome Darth Google." -- HonorableSoul Bytes: 4644 In news.software.readers, Eli the Bearded <*@eli.users.panix.com> wrote: > Okay, don't. Pick a Unix newsreader you like and compile it on Android. > It's a simple port compared to the old SunOS / AIX / NetBSD / Xenix / > etc portability issues. And most newsreaders are old enough to have been > ported to a large number of Unixes. FWIW, I got trn to compile and run in the Termux shell today. It needed a very small amount of code fiddling. Gotcha 1: Added the termux include and lib paths to glibpth and locincpth in config.sh (/data/data/com.termux/files/usr/lib and /data/data/com.termux/files/usr/include). Gotcha 2: Can't use /bin/sh, the sh to use is in a different directory. This is one of the more tedious things to fix, since it was ingrained in the authors that /bin/sh would just work. I used /data/data/com.termux/files/bin/sh instead. This needs to be fixed in the Makefile after running Configure and might need fixing in the various shell scripts created. Gotcha 3: Needed a b*-to-mem* patch, stick it in a a new file and modify Makefile, or stick it in an existing .c file. Make sure -lc is used during link. /* * strings.h functions bcopy / bcmp / bzero are obsolete, * replaced with string.h memcpy / memcmp / memset * A fix file for older software. */ #include <string.h> /* compares two strings and returns 0 if the same, non-zero otherwise. * memcmp is more explicit about what the non-zero value is than bcmp */ int bcmp(const void *sa, const void *sb, size_t sl) { int result = memcmp(sa, sb, sl); if(result) { return(1); } return(0); } /* memcpy returns the old value of dst, bcopy returns nothing. * the two also switch src/dst order */ void bcopy(const void *src, void *dst, size_t sl) { (void)memcpy(dst, src, sl); return; } /* bzero sets everything to zero. memset can set any value */ void bzero(void *nuke, size_t sl) { (void)memset(nuke, 0, sl); return; } Gotcha 4: The bison provided in Termux doesn't like the parsedate.y source. I built the parsedate.c file on another system with bison, and then it compiled and linked just fine. YMMV. Gotcha 5: There are no password file functions, so a judicious return() from the setusername() function in env.c was necessary (right before first #ifdef). The code is designed to cope with that function failing to do anything useful. Gotcha 6: Hard links don't work. In util.c, I changed a call to finalize(1) to return() to prevent hard links failing causing trn to quit early. Gotcha 7: Pnews isn't working, so posting doesn't work. This is probably an easy fix once I look at it. (Pnews is a shell script.) Gotcha N: I haven't tested Rnmail, but I fully expect that to not work. For one thing, I don't have a sendmail tool to actually send mail. Gotcha N+1: I haven't tested authenticated NNTP. I know that trn supports this, but I recall having to replace the included inews for that in the past. (The inews tool is used by Pnews to actually post the posts.) The Good: But the compile I had zero issues reading posts off of the test NNTP server I used. NNTPSERVER=news.mozilla.org ./trn Elijah ------ so quit yer bellyaching