This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reentrant functions


Op Thu, 8 Apr 2004 16:02:23 -0400
schreef Christopher Faylor <cgf-no-personal-reply-please van cygwin.com>
in <20040408200223.GD931@coc.bosbc.com>:
:  On Thu, Apr 08, 2004 at 09:30:47PM +0200, Bas van Gompel wrote:
[...]
: > $ grep -oR '_[^ ]\+_r *( *struct \+_reent' .|sed 's, *(.*,,'|sort|uniq
[...]
: > _remove_r and _stat64_r only occur in winsup/cygwin/syscalls.cc.
: > _fstat_r, _getpid_r and _stat_r are in winsup/cygwin/syscalls.cc
: > and newlib/libc.
: > The others are only in newlib/libc.
: >
: > Is this the info you wanted?
:
:   Not really.  The above list includes at least one function that are
:  already exported by the DLL.

True, _fcloseall_r, _fscanf_r, _scanf_r and _sscanf_r are already in
cygwin.din.

:  We also do not want to export _r functions which are unique only to
:  newlib.  For instance, I suspect that _mallopt_r is probably not
:  something that we want to export since no other UNIX has it.

That's not what was asked...

Corinna said:
[...]
|  Cygwin.  Any volunteer to collect these non-exported newlib functions
|  so that we can add all of them?


Ok, here goes again (this time assuming if <function> is exported
_<function>_r may also be exported):

====
for f in $(grep -hoR '_[^ ]\+_r *( *struct \+_reent' .|sed 's, *(.*,,' \
  |sort|uniq) ; do
 grep "^$f" winsup/cygwin/cygwin.din >/dev/null || (
 grep "^$(echo $f|sed 's,^_\(.*\)_r$,\1,')" winsup/cygwin/cygwin.din \
 >/dev/null && echo $f )
done
====
_atoi_r
_atol_r
_calloc_r
_close_r
_creat_r
_execve_r
_fcntl_r
_fgetpos_r
_fork_r
_free_r
_freopen_r
_fseek_r
_fseeko_r
_fsetpos_r
_fstat_r
_ftell_r
_ftello_r
_getenv_r
_getpid_r
_gettimeofday_r
_iprintf_r
_kill_r
_link_r
_lseek_r
_mallinfo_r
_malloc_r
_malloc_stats_r
_malloc_trim_r
_malloc_usable_size_r
_mallopt_r
_mblen_r
_memalign_r
_open_r
_printf_r
_read_r
_realloc_r
_remove_r
_rewind_r
_sbrk_r
_stat_r
_strtoll_r
_strtoull_r
_times_r
_tzset_r
_unlink_r
_valloc_r
_wait_r
_write_r
====

'_mallopt_r' is still there... Is there any reason it
should not be exported, when 'mallopt' is?

:  This is not something that will be solved by grep.  It actually
:  involves some research.

And here I was, thinking you were mean...

hth,

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]