[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libgen.h in Turb Linux 11.23
From: |
Ayad Jassim |
Subject: |
libgen.h in Turb Linux 11.23 |
Date: |
Mon, 05 Mar 2001 15:17:14 +0000 |
On turbolinux 11.23 release I am having a
problem with /usr/include/libgen.h header file.
Is this file part of our sgicc compiler?
It will help me to know how to inquire or file
a bug on the following issue:
Basicly, I have a c routine:
(Originally the code is much bigger than this.
I reduced it to this small code in order to create
this error easily. This used to compile OK on versions
prior to TurboLinux 11.23)
-------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
typedef struct
{
char *name, *basename;
} Patchlist;
#include <libgen.h>
void check_list( void)
{
Patchlist *pl;
printf( "Checking \"%s\" ... ",pl->basename);
}
----------------------------------------------------------------
With Turbo Linux 11.23 I get the following error:
sgicc -c foo.c
foo.c: In function `check_list':
foo.c:17: structure has no member named `__xpg_basename'
I noticed that if I move the line '#include <libgen.h>'
to above the definition of 'typedef struct ', then
the code compiles OK.
I checked on the difference between libgen.h in Turbolinux
11.23 versus for example our Nov02 cross compilers
and I can see what happened:
In Nov02, libgen.h had some XPG definitions as follows:
---------------------------------------------------
extern char *__xpg_basename __P ((char *__path));
#define basename(path) __xpg_basename (path)
---------------------------------------------------
while in Turbolinux 11.23, this changed to
-----------------------------------------------------
extern char *__xpg_basename (char *__path) __THROW;
#define basename __xpg_basename
-----------------------------------------------------
And you can see how the #define basename has now collided
with the user's 'basename' definition in the user coding
in struct Patchlist.
--
Ayad Jassim | Tel UK-0850-353386 Mobile
Applications Engineering | UK-1189-257614 Office
Silicon Graphics Inc. | Fax UK-1189-257505 Office
1530 Arlington Business Park, | email address@hidden
Theale, Reading, Berks RG7 4SB,UK|http://whitecity.reading/~ayad
- libgen.h in Turb Linux 11.23,
Ayad Jassim <=