bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

paste uses "FILE", not "FILE *"


From: Felix von Leitner
Subject: paste uses "FILE", not "FILE *"
Date: Thu, 26 Aug 2004 18:49:03 +0200
User-agent: Mutt/1.5.6i

The POSIX API does not define a way to do anything useful with
non-pointer FILE variables, so the diet libc (www.fefe.de/dietlibc/)
defines FILE as opaque data type.

The result is that paste does not compile, because it tries to
instantiate two FILE variables just for the purpose of having values for
FILE* to recognize later.

Proposed fix (in paste.c):

  static char dummy_closed;
  static char dummy_endlist;
  #define CLOSED ((FILE*)&dummy_closed)
  #define ENDLIST ((FILE*)&dummy_endlist)

There are other issues with coreutils: lib/fts_.h and lib/fts.c use "u_short".
Neither ISO C nor POSIX define such a type.  So the diet libc does not
define them unless you use -D_BSD_SOURCE (which you shouldn't,
obviously.  We have perfectly good standards, so we should adhere to
them).

Felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]