[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Re: [uClinux-dev] [patch] elf2flt
Hi John,
John Williams wrote:
> Are you OK with the attached patch from one of the microblaze list folks?
Yep, looks ok to me.
Regards
Greg
> Support for Win32 (e.g. not cygwin) builds of elf2flt.
>
> Patch submitted by Scott Thibault <thibault@gmvhdl.com>
>
> Thanks,
>
> John
>
>
> ------------------------------------------------------------------------
>
> ? Makefile
> ? busybox.dump
> ? busybox.elf
> ? busybox.elf.bflt
> ? busybox.reloc
> ? config.cache
> ? config.log
> ? config.patch
> ? config.status
> ? elf2flt
> ? elf2flt.c.save
> ? elf2flt.diff
> ? elf2flt.dump
> ? elf2flt.out
> ? elf2flt.win32.patch
> ? elf2flt@EXEEXT@
> ? flthdr
> ? flthdr@EXEEXT@
> ? ld-elf2flt
> ? out
> ? sh.bin
> ? sh.dump
> ? sh.elf
> ? sh.elf.bflt
> ? sh.flt
> ? sh.gdb
> ? sh.reloc
> ? sh.sym
> Index: elf2flt.c
> ===================================================================
> RCS file: /var/cvs/elf2flt/elf2flt.c,v
> retrieving revision 1.28
> diff -u -b -B -w -p -r1.28 elf2flt.c
> --- elf2flt.c 28 Oct 2004 16:54:25 -0000 1.28
> +++ elf2flt.c 7 Nov 2004 22:42:33 -0000
> @@ -40,8 +40,11 @@
> #include <unistd.h> /* Userland prototypes of the Unix std system calls */
> #include <fcntl.h> /* Flag value for file handling functions */
> #include <time.h>
> -
> +#ifndef WIN32
> #include <netinet/in.h> /* Consts and structs defined by the internet system */
> +#else
> +#include <winsock2.h>
> +#endif
>
> /* from $(INSTALLDIR)/include */
> #include <bfd.h> /* Main header file for the BFD library */
> @@ -1686,9 +1689,9 @@ int main(int argc, char *argv[])
> } \
> } while (0)
>
> - gf = fopen(ofile, "a");
> + gf = fopen(ofile, "ab"); /* Add 'b' to support non-posix (ie windows) */
> if (!gf) {
> - fprintf(stderr, "Can't opne file %s for writing\n", ofile); \
> + fprintf(stderr, "Can't open file %s for writing\n", ofile); \
> exit(4);
> }
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
--
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: gerg@snapgear.com
SnapGear -- a CyberGuard Company PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/