OSDN Git Service

Changes to compile under Solaris from The LEOX team <lpm@leox.org>.
authorDavid McCullough <davidm@snapgear.com>
Sun, 17 Feb 2002 23:20:14 +0000 (23:20 +0000)
committerDavid McCullough <davidm@snapgear.com>
Sun, 17 Feb 2002 23:20:14 +0000 (23:20 +0000)
elf2flt.c
flat.h
flthdr.c

index bf6d20f..51e2314 100644 (file)
--- a/elf2flt.c
+++ b/elf2flt.c
  * krab@california.daimi.aau.dk
  */
  
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <getopt.h>
-#include <stdarg.h>
-#include <bfd.h>
-#include <elf.h>
-#include "flat.h"
+#include <stdio.h>    /* Userland pieces of the ANSI C standard I/O package  */
+#include <stdlib.h>   /* Userland prototypes of the ANSI C std lib functions */
+#include <stdarg.h>   /* Allows va_list to exist in the these namespaces     */
+#include <string.h>   /* Userland prototypes of the string handling funcs    */
+#include <strings.h>
+#include <unistd.h>   /* Userland prototypes of the Unix std system calls    */
+#include <fcntl.h>    /* Flag value for file handling functions              */
+
+#include <netinet/in.h> /* Consts and structs defined by the internet system */
+
+/* from $(INSTALLDIR)/include       */
+#include <bfd.h>      /* Main header file for the BFD library                */
+
+#include <elf.h>      /* TARGET_* ELF support for the BFD library            */
+
+/* from uClinux-x.x.x/include/linux */
+#include "flat.h"     /* Binary flat header description                      */
+
 
 #ifdef TARGET_v850e
 #define TARGET_v850
diff --git a/flat.h b/flat.h
index f5d485d..ab0d53a 100644 (file)
--- a/flat.h
+++ b/flat.h
@@ -42,6 +42,7 @@ struct flat_hdr {
 #define FLAT_FLAG_GZDATA 0x0008 /* only data/relocs are compressed (for XIP) */
 
 
+#ifdef __KERNEL__ /* so systems without linux headers can compile the apps */
 /*
  * While it would be nice to keep this header clean,  users of older
  * tools still need this support in the kernel.  So this section is
@@ -79,4 +80,6 @@ typedef union {
        } reloc;
 } flat_v2_reloc_t;
 
+#endif
+
 #endif /* _LINUX_FLAT_H */
index d18215e..6c005aa 100644 (file)
--- a/flthdr.c
+++ b/flthdr.c
@@ -7,10 +7,14 @@
  */
 /****************************************************************************/
 
-#include <stdio.h>
-#include <getopt.h>
-#include <unistd.h>
-#include "flat.h"
+#include <stdio.h>    /* Userland pieces of the ANSI C standard I/O package  */
+#include <unistd.h>   /* Userland prototypes of the Unix std system calls    */
+
+/* macros for conversion between host and (internet) network byte order */
+#include <netinet/in.h> /* Consts and structs defined by the internet system */
+
+/* from uClinux-x.x.x/include/linux */
+#include "flat.h"     /* Binary flat header description                      */
 
 /****************************************************************************/