Print this page
remove support for non-ANSI compilation

@@ -17,10 +17,11 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
 /*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 #ifndef _LINK_H
 #define _LINK_H

@@ -44,11 +45,10 @@
  * These cannot be used in a 32bit large file capable environment because
  * libelf is not large-file safe.  Only define these interfaces if we are not
  * 32bit, or not in the large file environment.
  */
 #if !defined(_ILP32) || _FILE_OFFSET_BITS != 64
-#ifdef __STDC__
 #include <libelf.h>
 extern uint_t   ld_version(uint_t);
 extern void     ld_input_done(uint_t *);
 
 extern void     ld_start(const char *, const Elf32_Half, const char *);

@@ -71,31 +71,10 @@
                         Elf_Data *, Elf *, uint_t *);
 extern void     ld_section64(const char *, Elf64_Shdr *, Elf64_Word,
                         Elf_Data *, Elf *);
 
 #endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */
-#else
-extern void     ld_version();
-extern void     ld_input_done();
-
-extern void     ld_start();
-extern void     ld_atexit();
-extern void     ld_open();
-extern void     ld_file();
-extern void     ld_input_section();
-extern void     ld_section();
-
-#if defined(_LP64) || defined(_LONGLONG_TYPE)
-extern void     ld_start64();
-extern void     ld_atexit64();
-extern void     ld_open64();
-extern void     ld_file64();
-extern void     ld_input_section64();
-extern void     ld_section64();
-
-#endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */
-#endif /* __STDC__ */
 #endif /* !defined(_ILP32) || _FILE_OFFSET_BITS != 64 */
 
 /*
  * ld_version() version values.
  */

@@ -222,11 +201,10 @@
 typedef unsigned int            uintptr_t;
 #endif
 #endif
 
 
-#ifdef  __STDC__
 extern uint_t           la_version(uint_t);
 extern void             la_activity(uintptr_t *, uint_t);
 extern void             la_preinit(uintptr_t *);
 extern char             *la_objsearch(const char *, uintptr_t *, uint_t);
 extern uint_t           la_objopen(Link_map *, Lmid_t, uintptr_t *);

@@ -252,29 +230,11 @@
 extern uintptr_t        la_i86_pltenter(Elf32_Sym *, uint_t, uintptr_t *,
                                 uintptr_t *, La_i86_regs *, uint_t *);
 extern uintptr_t        la_pltexit(Elf32_Sym *, uint_t, uintptr_t *,
                                 uintptr_t *, uintptr_t);
 #endif /* _LP64 */
-#else  /* __STDC__ */
-extern uint_t           la_version();
-extern void             la_preinit();
-extern uint_t           la_objopen();
-extern uint_t           la_objclose();
-extern int              la_objfilter();
-#if     defined(_LP64)
-extern uintptr_t        la_sparcv9_pltenter();
-extern uintptr_t        la_pltexit64();
-extern uintptr_t        la_symbind64();
-#else  /* _ILP32 */
-extern uintptr_t        la_sparcv8_pltenter();
-extern uintptr_t        la_i86_pltenter();
-extern uintptr_t        la_pltexit();
-extern uintptr_t        la_symbind32();
-#endif /* _LP64 */
-#endif /* __STDC__ */
 
-#ifdef  __STDC__
 /*
  * The ElfW() macro is a GNU/Linux feature, provided as support for
  * the dl_phdr_info structure used by dl_phdr_iterate(), which also
  * originated under Linux. Given an ELF data type, without the ElfXX_
  * prefix, it supplies the appropriate prefix (Elf32_ or Elf64_) for

@@ -324,11 +284,10 @@
         u_longlong_t            dlpi_subs;
 };
 
 extern  int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *),
             void *);
-#endif /* __STDC__ */
 
 #endif  /* _ASM */
 #endif /* _KERNEL */