From: SourceForge.net <no...@so...> - 2008-05-18 14:06:32
|
Patches item #1965676, was opened at 2008-05-16 23:41 Message generated for change (Settings changed) made by borutr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300599&aid=1965676&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Tim Stahlhut (stahta01) Assigned to: Borut Ražem (borutr) Summary: Patch for Win32 16 bit PIC Initial Comment: The get_line function in file pic16/device.c is not working right in windows. Without any changes it is having an endless loop in SDCC. This patch changes the open to Binary Read instead of Text Read. It needs tested under Linux and Mac, but the code looks like it should have been binary read for all platforms. Tim Stahlhut Index: sdcc/src/pic16/device.c =================================================================== --- sdcc/src/pic16/device.c (revision 5157) +++ sdcc/src/pic16/device.c (working copy) @@ -550,7 +550,7 @@ SNPRINTF(&buffer[0], PATH_MAX, "%s%s%s", path, DIR_SEPARATOR_STRING, DEVICE_FILE_NAME); //printf("%s: checking %s\n", __func__, &buffer[0]); - f = fopen(&buffer[0], "r"); + f = fopen(&buffer[0], "rb"); } // for } // while } // if ---------------------------------------------------------------------- Comment By: Tim Stahlhut (stahta01) Date: 2008-05-18 14:58 Message: Logged In: YES user_id=662788 Originator: YES Your patch fixed the problem, I just downloaded the Windows Snapshot and it worked. Thanks, Tim S ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2008-05-18 08:51 Message: Logged In: YES user_id=568035 Originator: NO Fixed in a different way in svn revision #5158. Borut ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300599&aid=1965676&group_id=599 |