*BSD News Article 24137


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!news.umbc.edu!europa.eng.gtefsd.com!library.ucla.edu!csulb.edu!csus.edu!netcom.com!pcbsd
From: pcbsd@netcom.com (PCBSD Development Manager)
Subject: Re: Porting NetBSD to OS/2 and Windows NT
Message-ID: <pcbsdCGnDA4.Box@netcom.com>
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
X-Newsreader: TIN [version 1.1 PL8]
References: <SHIPLEY.93Nov16112909@oak.dis.org>
Date: Wed, 17 Nov 1993 17:44:26 GMT
Lines: 27

Peter Shipley (shipley@oak.dis.org) wrote:

: In article <pcbsdCGE4oI.5zw@netcom.com> pcbsd@netcom.com (PCBSD Development Manager) writes:
: >   What that means is that some of the Section 3 and up code needs to be
: >   modified to be able to work with desktop filesystems transparently.  One
: >   of the most frustrating differences on desktop is the \r\n used to delimit
: >   the end of line in text files (whereas it is just \n on UNIX).

: that should be a funtion  of the OS layer not the C libarary, for example what it
: I import a i386  NetBSD or FreeBSD binary? same thing with file permissions.
: you might want to add a new libc call "rew_open" or something that will open
: a file directly.

What happens in our case, is that you may choose the default mode an app
will open files in, or you may call _open_text or _open_binary, or you
may call open(,O_TEXT,) or open(,O_BINARY,) to fine tune.  The default
mode is set by either linking to crt0txt or crt0bin or by calling
_open_mode_set(O_TEXT or O_BINARY).  If you do nothing, O_TEXT is used by
default (since most apps just process stdin/out).

The ability to use the O_TEXT mode is built in the kernel, but it needs to
know when to use it.
-- 


---------------------------------          ------------------------------
--  PCBSD Development Manager  --        --  Service Commitment Support  --
---------------------------------          ------------------------------