On Thu, Jul 21, 2011 at 1:57 AM, Jie Zhang <[email protected]> wrote:
> On Wed, Jul 20, 2011 at 6:57 PM, Mike Frysinger <[email protected]> wrote:
>> On Wed, Jul 20, 2011 at 17:33, Jie Zhang wrote:
>>> I thought about this. But I'm wondering if we really need those header
>>> files. I don't know what system will reject "b" and if they are still
>>> in use nowadays. So I think it will be safe to just always append "b"
>>> for now until some complains. Actually I suspect it will happen.
>>
>> i'm fine with either
>>
> Here is a new patch. Compared to the previous one, I dropped 'B' from
> FOPEN_R/W. I also changed conditionals for defining them, which I
> think is better. It assumes three things:
>
> 1. All compilers for Windows should define _WIN32
> 2. No one will compile UrJTAG for DOS, which would also require "b"
> 3. On all other OSs "e" is defined as GLIBC or is ignored silently
>
> I think all three assumptions are pretty safe. What do you think?
>
Since Mike is away for a few days, I have committed this patch to
enable me moving forward. We can fix it if there is anything wrong.
* src/tap/detect.c (find_record): Use FOPEN_R or FOPEN_W for mode in fopen.
* src/tap/cable/gpio.c (gpio_export): Likewise.
(gpio_direction): Likewise.
* src/tap/cable/ice100.c (ice_read_hex_file): Likewise.
* src/bsdl/bsdl.c (urj_bsdl_read_file): Likewise.
* src/bsdl/vhdl_flex.l (urj_vhdl_flex_switch_file): Likewise.
* src/global/parse.c (urj_parse_file): Likewise.
* src/cmd/cmd_bfin.c (cmd_bfin_run): Likewise.
* src/cmd/cmd_flashmem.c (cmd_flashmem_run): Likewise.
* src/cmd/cmd_pld.c (cmd_pld_run): Likewise.
* src/cmd/cmd_writemem.c (cmd_writemem_run): Likewise.
* src/cmd/cmd_svf.c (cmd_svf_run): Likewise.
* src/cmd/cmd_readmem.c (cmd_readmem_run): Likewise.
* src/apps/bsdl2jtag/bsdl2jtag.c (main): Likewise.
* sysdep.h (FOPEN_R, FOPEN_W): Define.
Jie
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development