delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/09/13:19:11

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <n2m-g.c56rth.3vveivt.1@buzzy-box.bavag>
From: Bas van Gompel <cygwin DOT buzz AT bavag DOT tmfweb DOT nl>
Subject: Re: reentrant functions
References: <20040407044353 DOT GA6805 AT panix DOT com> <20040407194643 DOT GM26558 AT cygbert DOT vinschen DOT de> <n2m-g DOT c54g74 DOT 3vv9r8p DOT 1 AT buzzy-box DOT bavag> <20040408200223 DOT GD931 AT coc DOT bosbc DOT com> <n2m-g DOT c551ql DOT 3vvb145 DOT 1 AT buzzy-box DOT bavag> <20040409010034 DOT GA3252 AT coc DOT bosbc DOT com> <n2m-g DOT c55888 DOT 3vv9tgd DOT 1 AT buzzy-box DOT bavag> <20040409040156 DOT GA4342 AT coe>
In-Reply-To: <20040409040156.GA4342@coe>
Organisation: Ehm...
User-Agent: slrn/0.9.8.0 (Win32) Hamster/2.0.3.0
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Lines: 89
Date: Fri, 9 Apr 2004 19:18:53 +0200 (MET DST)
X-IsSubscribed: yes

Op Fri, 9 Apr 2004 00:01:56 -0400
schreef Christopher Faylor <cgf-no-personal-reply-please uit cygwin.com>
in <20040409040156 DOT GA4342 AT coe>:
:  On Fri, Apr 09, 2004 at 04:33:26AM +0200, Bas van Gompel wrote:
[don't export _r functions which are only in newlib and in no UNIX]

: > Yeah, sure. But this means I won't be able to help any further
: > with this, as I don't know which UNIXes export which functions,.
:
:   Fair enough.
:
:  My previous message was somewhat garbled.  Let me try again.

Ok.

:  Corinna did not provide enough guidelines in stating what was required.
:  I was attempting to clarify that it wasn't enough to just get a list of
:  all *_r from newlib which are not exported by cygwin.  Although I gave a
:  vague "UNIX" guideline I did not offer any clear way for you to
:  determine which functions should be exported.
:
:  I gave you an example of one such routine but I was too demure in my
:  presentation.  mallopt_r is definitely something that we do not want to
:  include, as is realloc_r, and malloc_r, free_r, gettimeofday_r, and
:  tmpfile_r.  The reason why these are not desired is that newlib defines
:  a number of _r type functions that do not exist on linux or in the
:  Single UNIX Specification.

That's clear now.

:  For a reference of what is acceptable, you can use The Single Unix
:  Specification v3:
:
:  http://www.opengroup.org/onlinepubs/007904975/toc.htm

Interesting document.

:  This reference would be adequate in determining what to include but,
:  if in doubt about something that seems like a useful function, then
:  double checking with linux should be adequate.
:
:  The SUSv3 reference does not define the mallopt function but functions
:  not ending in _r are not the subject of this exercise.  We are trying to
:  export the reentrant routines which have a UNIX analog.  We're not
:  trying to bloat cygwin with reentrant routines that no one else uses.

Would it be an idea to create a separate library with those other
functions? (Some look like they might be usable.)

:  There is also another reason not to use mallopt_r -- cygwin doesn't use
:  the malloc version in newlib so exporting any of the _r malloc functions
:  from newlib would cause runtime errors for anyone who used them.

Now there's a reason! :)

[mallopt on UNIXen}

:  Again, the criteria is not to export every _r function for which there
:  is an exported non-_r function.  We only want to export the ones that
:  make sense for a UNIX environment.

Ok then, another try...

Candidates getgrgid_r, getgrnam_r and getlogin_r are not
implemented.

ttyname_r appears to be implemented only for linux
(in newlib/libc/sys/linux/ttyname_r.c).

ctime_r, asctime_r, getpwnam_r, getpwuid_r, gmtime_r, localtime_r,
strerror_r and strtok_r are already exported.

That leaves:
====
rand_r
readdir_r
====

Is this any better?

(The OP is not gonna like this, as he wanted _gets_r.)

L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019