public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* missing libc_hidden_proto() declarations?
@ 2003-01-14  6:58 David Mosberger
  2003-01-14  7:16 ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: David Mosberger @ 2003-01-14  6:58 UTC (permalink / raw)
  To: libc-hacker

I had to declare if_nametoindex() and if_indextoname() with
libc_hidden_proto() to get libc to compile on ia64 linux (with
gcc-pre3.4).  Since this seems to work for others, perhaps I'm doing
something wrong?

	--david

2003-01-13  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/gnu/net/if.h (if_nametoindex): Mark as libc_hidden_proto.
	(if_indextoname): Likewise.

Index: sysdeps/gnu/net/if.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/gnu/net/if.h,v
retrieving revision 1.5
diff -u -r1.5 if.h
--- sysdeps/gnu/net/if.h	6 Jul 2001 04:55:51 -0000	1.5
+++ sysdeps/gnu/net/if.h	14 Jan 2003 06:46:50 -0000
@@ -192,6 +192,9 @@
 extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
 extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
 
+libc_hidden_proto (if_nametoindex);
+libc_hidden_proto (if_indextoname);
+
 /* Return a list of all interfaces and their indices.  */
 extern struct if_nameindex *if_nameindex (void) __THROW;
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: missing libc_hidden_proto() declarations?
  2003-01-14  6:58 missing libc_hidden_proto() declarations? David Mosberger
@ 2003-01-14  7:16 ` Jakub Jelinek
  2003-01-14  7:33   ` David Mosberger
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2003-01-14  7:16 UTC (permalink / raw)
  To: davidm; +Cc: libc-hacker

On Mon, Jan 13, 2003 at 10:57:55PM -0800, David Mosberger wrote:
> I had to declare if_nametoindex() and if_indextoname() with
> libc_hidden_proto() to get libc to compile on ia64 linux (with
> gcc-pre3.4).  Since this seems to work for others, perhaps I'm doing
> something wrong?

libc/include/net/if.h has:
#ifndef _NET_IF_H

# include_next <net/if.h>

libc_hidden_proto (if_nametoindex)
libc_hidden_proto (if_indextoname)

#endif

which should take care of this.
So you should investigate why include/net/if.h has not been included.

	Jakub

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: missing libc_hidden_proto() declarations?
  2003-01-14  7:16 ` Jakub Jelinek
@ 2003-01-14  7:33   ` David Mosberger
  2003-01-14  7:45     ` Ulrich Drepper
  0 siblings, 1 reply; 5+ messages in thread
From: David Mosberger @ 2003-01-14  7:33 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: davidm, libc-hacker

>>>>> On Tue, 14 Jan 2003 08:16:14 +0100, Jakub Jelinek <jakub@redhat.com> said:

  Jakub> On Mon, Jan 13, 2003 at 10:57:55PM -0800, David Mosberger
  Jakub> wrote:
  >> I had to declare if_nametoindex() and if_indextoname() with
  >> libc_hidden_proto() to get libc to compile on ia64 linux (with
  >> gcc-pre3.4).  Since this seems to work for others, perhaps I'm
  >> doing something wrong?

  Jakub> libc/include/net/if.h has: #ifndef _NET_IF_H

  Jakub> # include_next <net/if.h>

  Jakub> libc_hidden_proto (if_nametoindex) libc_hidden_proto
  Jakub> (if_indextoname)

  Jakub> #endif

  Jakub> which should take care of this.  So you should investigate
  Jakub> why include/net/if.h has not been included.

The file include/net/if.h doesn't exist in my tree.  I'm probably
doing something wrong with cvs.  Is there a reason why "cvs update"
wouldn't pick up this (presumably new) file?

	--david

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: missing libc_hidden_proto() declarations?
  2003-01-14  7:33   ` David Mosberger
@ 2003-01-14  7:45     ` Ulrich Drepper
  2003-01-14 17:08       ` David Mosberger
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 2003-01-14  7:45 UTC (permalink / raw)
  To: davidm; +Cc: Jakub Jelinek, libc-hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Mosberger wrote:

> The file include/net/if.h doesn't exist in my tree.  I'm probably
> doing something wrong with cvs.  Is there a reason why "cvs update"
> wouldn't pick up this (presumably new) file?

It's in a new directory.  Add -d after cvs update.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+I8AL2ijCOnn/RHQRAkDjAJ9aF/zqP6Jq97gZ8RExAtDMJfRVOQCfRaBo
maqSi097eZbWl/ZihiBFPkQ=
=6TpD
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: missing libc_hidden_proto() declarations?
  2003-01-14  7:45     ` Ulrich Drepper
@ 2003-01-14 17:08       ` David Mosberger
  0 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2003-01-14 17:08 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: libc-hacker

>>>>> On Tue, 14 Jan 2003 07:45:15 +0000, Ulrich Drepper <drepper@redhat.com> said:

  Uli> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

  Uli> David Mosberger wrote:

  >> The file include/net/if.h doesn't exist in my tree.  I'm probably
  >> doing something wrong with cvs.  Is there a reason why "cvs
  >> update" wouldn't pick up this (presumably new) file?

  Uli> It's in a new directory.  Add -d after cvs update.

That did the trick.  Thanks!

	--david

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-14 17:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14  6:58 missing libc_hidden_proto() declarations? David Mosberger
2003-01-14  7:16 ` Jakub Jelinek
2003-01-14  7:33   ` David Mosberger
2003-01-14  7:45     ` Ulrich Drepper
2003-01-14 17:08       ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).