This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] Add STAT_STOPPED_IMAGE to SYNC ALL / SYNC IMAGES


On Thu, Jul 7, 2011 at 20:47, Tobias Burnus <burnus@net-b.de> wrote:
>> Incidentally, today I re-downloaded the sources from SVN and now it takes
>> forever to do a diff. I don't think it was that slow before. Now it's taking
>> in the order of 10min for an "svn diff". Can anyone guess a reason why this
>> might be or what I can do about it?
>
> Reason: No idea, but "svn diff" or "svn update" can take quite some time.
> But doing something about it, is simple: Instead of "svn diff" you could
> also use "svn diff libgfortran gcc" or even "svn diff gcc/fortran" if you
> know that your modifications are only in that subdirectory.

Or just use git, where one of the advantages is that diff is very
fast. In particular, diffs between arbitrary revisions don't need
network access. See e.g. http://gcc.gnu.org/wiki/GitMirror

> Code like the following makes me always worrying about buffer overflows:
>
> + Â Â Âchar msg[50];
> + Â Â Â len = sprintf (msg, "ERROR: Image %d is stopped", caf_this_image);
>
>
> Thus, I would prefer to use snprintf. The latter has the disadvantage that
> not all systems support it, but I think all systems of interest do, if not
> we can still modify it. (On MinGW __mingw_snprintf is preferred, but for
> simple %d and %s, also Microsoft's snprintf should be sufficient.)

In libgfortran.h we have some macros which allows us to use snprintf()
(or __mingw_snprintf() aliased as snprintf()) everywhere, falling back
to sprintf() if snprintf() is not available. Thus there is no need to
clutter the rest of the code with #ifdefs.


-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]