=================================================================== RCS file: /cvsrepo/anoncvs/cvs/www/Attic/porting.html,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** www/Attic/porting.html 1998/08/12 22:13:02 1.9 --- www/Attic/porting.html 1998/08/13 23:11:18 1.10 *************** *** 67,92 ****
  • OpenBSD does NOT compress man pages.
  • OpenBSD does NOT require -lcrypt.
    DES encryption is part of the standard libc. !
  • OpenBSD requests all mktemp warnings to be fixed. ! This is not as simple as s/mktemp/mkstemp/g. If you are not absolutely sure of what you are doing please request help from the ports mailing list.
  • Any software to be installed as a server should be scanned for buffer overflows, especially unsafe use of strcat/strcpy/strcmp/sprintf. In general, sprintf should be replaced with snprintf. !
  • Be sure to add the $OpenBSD$ CVS tag to ! the Makefile. If importing a port from another system be sure to ! leave their tag in the Makefile, too. However, replace the FreeBSD ! $Id$ tag with the ! $FreeBSD$ tag. !
  • Do NOT use alpha or beta code when preparing a port. Use the ! latest regular or patch release. !
  • The goal is to get all ported applications to support OpenBSD. To ! achieve this goal you MUST feed any OpenBSD patches back to the ! application maintainer.

    Other Helpful Hints

    ! !

    Security recommendations

    ! There are many security problems to worry about. If you are not absolutely sure of what you are doing please request help from the
    ports mailing list. + + +

    Generic porting hints

    +

    Other Helpful Hints


    OpenBSD www@openbsd.org !
    $OpenBSD: porting.html,v 1.9 1998/08/12 22:13:02 marc Exp $ --- 267,301 ---- ncurses.h ==> curses.h
    -lncurses ==> -lcurses
    ``Old curses'' is available as ocurses.h/libocurses. +
  • In OpenBSD, terminal discipline has been upgraded from the older sgtty + standard BSD fcntl to the newer POSIX tcgetattr family. + Avoid the older style in new code. Some code may define tcgetattr + to be a synonym for the older fcntl, but this is at best a stopgap + measure on OpenBSD. The xterm source code is a very good example of + what not to do. + Try to get your system functionality right: you want a type that remembers + the state of your terminal (possible typedef), you want a function that + extracts the current state, and a function that sets the new state. + Functions that modify this state are more difficult, as they tend to vary + depending upon the system. Also, don't forget that you will have to handle + cases where you are not connected to the terminal, and that you need to + handle signals: not only termination, but also getting put in the background + you should leave your terminal in a sane state. Do your tests under an + older shell, such as sh, which does not reset the terminal in any way at + program's termination. +
  • The newer termcap and curses, as included with OpenBSD, include standard sequences + for controlling color terminals. You should use these if possible, reverting + to standard ANSI color sequences on other systems. However, some terminal descriptions + have not been updated yet, and you may need to be able to specify these sequences manually. + This is the way vim5.1 handles it. This is not strictly necessary. Except for privileged + programs, it is generally possible to override a termcap definition through the + TERMCAP variable and get it to work properly. +
  • Signal semantics are tricky, and vary from one system to another. Use sigaction + to ensure a specific semantics, along with other system calls referenced in its manpage.
    OpenBSD www@openbsd.org !
    $OpenBSD: porting.html,v 1.10 1998/08/13 23:11:18 espie Exp $