On 07/29/10 08:26, joerg.schill...@fokus.fraunhofer.de wrote:
"Roger A. Faulkner"<roger.faulk...@oracle.com>  wrote:

      ===========================================================

      #include<stdio.h>

      ssize_t getdelim(char **restrict, size_t *restrict,
              int, FILE *restrict);
      ssize_t getline(char **restrict, size_t *restrict,
              FILE *restrict);

      The getdelim() and getline() functions are specified in SUSv4.
This getline() is in conflict with a basic POSIX rule:

        POSIX does not define interfaces that are inconflict with existing
        public interfaces on UNIX systems.

That an issue for the standards body.
I'm just following the SUSv4 specification, as well as getline()
as defined by recent versions of GNU/Linux, which has the
same function signature.

FWIW, I agree that 'getline' was an unfortunate choice of a name
for this interface by the standards body, since 'getline' is such
a commonly-used name.

There is a public getline() function defined aprox. 1980-1982:

        ssize_t fgetline __PR((FILE *, char *, size_t));

and there are local functions on Solaris that are called getline()...

Yes, 32 of them, none of them public interfaces.
Plus there are about 200 references to them.
I changed all of them to a different name, which
is what others will have to do when compiling code
that has instances of 'getline' in it once they install
a system with this change in <stdio.h> and libc.

There will be a release note about this
when the project is integrated.

There will be no problem with running such apps
until they need to be recompiled.

Roger


_______________________________________________
opensolaris-arc mailing list
opensolaris-arc@opensolaris.org

Reply via email to