John Beck wrote:
> 
> http://cr.opensolaris.org/~jbeck/mailwrapper/
> 
> Ceri did 99% of the work; I'm just sponsoring it.  It's a simple port
> of mailwrapper from NetBSD, with some packaging and Makefile goo to
> make it work in ON.  I'm targeting build 116 which opens next week,
> assuming I can get license review and approval soon enough, so let's
> say end of the day May 15 for feedback please.  Thanks...

>From a 5min look at
http://cr.opensolaris.org/~jbeck/mailwrapper/mailwrapper.patch it looks
Ok for me... 

... some nits:
* a -xstrconst in the CFLAGS would be nice (footprint reduction).

* IMO it would be nice to compile this application with C99/XPG6 flags
(footprint reduction/performance)

* While /usr/include/iso/stdio_iso.h defines |BUFSIZ| as |#define BUFSIZ
1024| I would still prefer a larger buffer to make sure it can hold a
full path and additionally text. AFAIK a value of 2*PATH_MAX+1 may be
nice.

* usr/src/cmd/mailwrapper/mailwrapper.c
-  Line 57:  int main(int, char *[], char *[]);
Why is this prototype required ?

- What about better messages for |malloc| failure handling, e.g. lines:
 68    err(EX_TEMPFAIL, "malloc");
 84    err(EX_TEMPFAIL, "strdup");
etc.
AFAIK at least the function name in these message _may_ be helpfull.

- It may be nice to use |strtok_r()| instead of |strtok()| (performance
(|strtok()| uses |tsdalloc()| and then calls |strtok_r()|))

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to