delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/14/18:19:16

Date: Fri, 15 Jul 94 07:03:49 JST
From: Stephen Turnbull <turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp>
To: dj AT ctron DOT com, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: v 1.11 "bugs" to fix in 1.12

Would it be possible (and reasonable) to move the stubs for
unimplemented functions to a separate library?
    For example, in the current implementation of "always fail" stubs
for pipe(), fork(), etc, the program links fine, the stub fails wwhen
the program is run, certain programs then report a non-DJGPP errno,
attempt to index past the end of the array of error messages, and
GPF in _doprt with an illegal access error.  Took me a couple of days
to figure out what was happening.  (I didn't know much about the error
reporting mechanisms at that time, I thought it was a bug in DJGPP
somewhere; it was actually a badly written program which accessed the
error message array directly instead of through the semi-standard
error reporting function, I forget its name.)
    The logic of a separate library is that (eg) a program which
always calls pipe() to do some output would not link and you'd know
why, but a program that uses pipe() only in unusual circumstances (eg,
a program that asks for the name of a file and allows you to specify a
pipe instead) could be specifically linked against that library and
tested without fixing the source code in the early stages.  I don't
know if supporting this kind of laziness makes much sense.  But
certainly I personally would prefer that the stubs be removed from
libc whether or not a libstub was provided.

+-----------------------------------------------------------------------+
|                           Stephen Turnbull                            |
|     University of Tsukuba, Institute of Socio-Economic Planning       |
|          Tennodai 1-chome 1--1, Tsukuba, Ibaraki 305 JAPAN            |
|        Phone:  +81 (298) 53-5091     Fax:  +81 (298) 55-3849          |
|               Email:  turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp                 |
|                                                                       |
|                Founder and CEO, Skinny Boy Associates                 |
|               Mechanism Design and Social Engineering                 |
| REAL solutions to REAL problems of REAL people in REAL time!  REALLY. |
|                      Phone:  +81 (298) 56-2703                        |
+-----------------------------------------------------------------------+

- Raw text -


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