* [9fans] pptp.c install failed
@ 2001-11-11 18:54 William S .
0 siblings, 0 replies; 8+ messages in thread
From: William S . @ 2001-11-11 18:54 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
I attempted to install pptp.c as below but
it failed. Any way to make it install?
Bill
Amsterdam, NL
[-- Attachment #2: error.txt --]
[-- Type: text/plain, Size: 289 bytes --]
term% mk pptp.install
8c -FVw pptp.c
pptp.c:92 function args not checked: threadnonotes
pptp.c:671 name not declared: ERRMAX
pptp.c:671 array size must be a positive constant
pptp.c:674 function args not checked: rerrstr
mk: 8c -FVw pptp.c : exit status=rc 2929:8c 2931:error
term%
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <rsc@plan9.bell-labs.com>]
* Re: [9fans] pptp.c install failed
@ 2001-11-11 20:35 ` Russ Cox
2001-11-11 21:17 ` Scott Schwartz
2001-11-12 18:13 ` William S .
0 siblings, 2 replies; 8+ messages in thread
From: Russ Cox @ 2001-11-11 20:35 UTC (permalink / raw)
To: 9fans
> pptp.c:92 function args not checked: threadnonotes
threadnonotes is in the 03270425a update.
> pptp.c:671 name not declared: ERRMAX
> pptp.c:671 array size must be a positive constant
> pptp.c:674 function args not checked: rerrstr
sorry. i was using a new interface.
change it to e[ERRLEN] and rerrstr(e) and
add the function
void
rerrstr(char *buf)
{
char tmp[ERRLEN];
errstr(tmp);
memmove(buf, tmp, ERRLEN);
errstr(tmp);
}
before there.
russ
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] pptp.c install failed
2001-11-11 20:35 ` Russ Cox
@ 2001-11-11 21:17 ` Scott Schwartz
2001-11-11 23:25 ` Dan Cross
2001-11-12 11:42 ` Boyd Roberts
2001-11-12 18:13 ` William S .
1 sibling, 2 replies; 8+ messages in thread
From: Scott Schwartz @ 2001-11-11 21:17 UTC (permalink / raw)
To: 9fans
> rerrstr(char *buf)
Why not ``rerrstr(char *buf, int size)''?
Or even ``rerrstr(Str buf)''?
C needs a counted array type, but until then we shouldn't
cut corners.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] pptp.c install failed
2001-11-11 21:17 ` Scott Schwartz
@ 2001-11-11 23:25 ` Dan Cross
2001-11-12 11:42 ` Boyd Roberts
1 sibling, 0 replies; 8+ messages in thread
From: Dan Cross @ 2001-11-11 23:25 UTC (permalink / raw)
To: 9fans
In article <20011111211751.23249.qmail@g.bio.cse.psu.edu> you write:
>C needs a counted array type
I disagree. What we need is a new systems programming language that
includes a first-class string type that can grow dynamically. Limbo
does this, but I don't think it goes far enough in other areas
(functions should be first-class, too, and where's my generic
dictionary? If I ever have to code another set of freakin' hash table
routines... I mean come on, that's not skill, it's tedium).
C is *really great* for what it does, but all too often it becomes the
language of choice when it shouldn't be. If Inferno taught us nothing
else, it's that it needn't be a one-man game. Large chunks of the
Inferno kernel are written in C, but all of the user-land stuff is done
in Limbo. If we could take that concept of a two-man game and apply it
to Plan 9, we'd have an incredibly powerful system (but be even further
marginalized).
I guess what I'm really looking for is something like ``Limbo vs. ML''
meets ``?[cl]'' to replace C at the user level.
- Dan C.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] pptp.c install failed
2001-11-11 21:17 ` Scott Schwartz
2001-11-11 23:25 ` Dan Cross
@ 2001-11-12 11:42 ` Boyd Roberts
1 sibling, 0 replies; 8+ messages in thread
From: Boyd Roberts @ 2001-11-12 11:42 UTC (permalink / raw)
To: 9fans
Scott Schwartz wrote:
> C needs a counted array type, but until then we shouldn't
> cut corners.
No, C needs to be left alone. Use limbo.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] pptp.c install failed
2001-11-11 20:35 ` Russ Cox
2001-11-11 21:17 ` Scott Schwartz
@ 2001-11-12 18:13 ` William S .
1 sibling, 0 replies; 8+ messages in thread
From: William S . @ 2001-11-12 18:13 UTC (permalink / raw)
To: 9fans
OK, I applied the changes as you specified below
and it installed. However, when I ran pptp
this happened:
term% ip/ipconfig ether /net/ether0 10.0.0.150 255.255.255.0
ip/ipconfig: binding device: dial 0x800 failed
term%
Is something configured incorrectly that I need to
change?
Thank you,
Bill
On Sun, Nov 11, 2001 at 03:35:38PM -0500, Russ Cox wrote:
> > pptp.c:92 function args not checked: threadnonotes
>
> threadnonotes is in the 03270425a update.
>
> > pptp.c:671 name not declared: ERRMAX
> > pptp.c:671 array size must be a positive constant
> > pptp.c:674 function args not checked: rerrstr
>
> sorry. i was using a new interface.
> change it to e[ERRLEN] and rerrstr(e) and
> add the function
>
> void
> rerrstr(char *buf)
> {
> char tmp[ERRLEN];
>
> errstr(tmp);
> memmove(buf, tmp, ERRLEN);
> errstr(tmp);
> }
>
> before there.
>
> russ
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] pptp.c install failed
@ 2001-11-11 21:32 Russ Cox
0 siblings, 0 replies; 8+ messages in thread
From: Russ Cox @ 2001-11-11 21:32 UTC (permalink / raw)
To: 9fans
> Why not ``rerrstr(char *buf, int size)''?
> Or even ``rerrstr(Str buf)''?
>
> C needs a counted array type, but until then we shouldn't
> cut corners.
As part of the 9P2000 changes, we fixed both errstr and
rerrstr as you suggest:
int errstr(char *err, uint nerr)
void rerrstr(char *err, uint nerr)
ERRMAX takes the place of ERRLEN, but it is a convention
rather than a specification: if you use one that is too big
or too small, the safety of your program isn't put in jeopardy.
Thus the code in question originally read:
void
ewrite(int fd, void *buf, int nbuf)
{
char e[ERRMAX], path[64];
if(write(fd, buf, nbuf) != nbuf){
rerrstr(e, sizeof e);
strcpy(path, "unknown");
fd2path(fd, path, sizeof path);
myfatal("write %d to %s: %s", nbuf, path, e);
}
}
which I think you wouldn't have any problems with.
I did think about posting an rerrstr(char*, uint), but
our rerrstr uses utfecpy to make sure it truncates at
a character boundary, and that function is post-distribution
too, so I stopped the cascade by assuming ERRLEN: since
the distribution errstr already does it, I don't see a problem
doing it in other places until we get a proper distribution out.
Russ
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] pptp.c install failed
@ 2001-11-12 21:49 Russ Cox
0 siblings, 0 replies; 8+ messages in thread
From: Russ Cox @ 2001-11-12 21:49 UTC (permalink / raw)
To: 9fans
you shouldn't have to run ipconfig. just do
ip/pptp [-s user:password] 1.2.3.4
where 1.2.3.4 is your pptp server.
it sets up the interface for you.
netstat -i
should show it.
russ
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-11-12 21:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-11 18:54 [9fans] pptp.c install failed William S .
[not found] <rsc@plan9.bell-labs.com>
2001-11-11 20:35 ` Russ Cox
2001-11-11 21:17 ` Scott Schwartz
2001-11-11 23:25 ` Dan Cross
2001-11-12 11:42 ` Boyd Roberts
2001-11-12 18:13 ` William S .
2001-11-11 21:32 Russ Cox
2001-11-12 21:49 Russ Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).