]> granicus.if.org Git - graphviz/commitdiff
remove block size optimization in sfio
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Sep 2020 19:07:04 +0000 (12:07 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Sep 2020 00:35:04 +0000 (17:35 -0700)
Related to #1422 and #1521.

lib/sfio/sfsetbuf.c

index 8f92661d16906a886fe1bcbe34e9bed1c49573f3..cf2090d4b1a441e256238759a10c66b3952c455c 100644 (file)
@@ -154,11 +154,6 @@ void *sfsetbuf(Sfio_t * f, void * buf, size_t size)
        if (fstat((int) f->file, &st) < 0)
            f->here = -1;
        else {
-#if defined(HAVE_SYS_STAT_H) && _stat_blksize  /* preferred io block size */
-           if ((blksize = (ssize_t) st.st_blksize) > 0)
-               while ((blksize + (ssize_t) st.st_blksize) <= SF_PAGE)
-                   blksize += (ssize_t) st.st_blksize;
-#endif
            if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))
                f->here = SFSK(f, (Sfoff_t) 0, SEEK_CUR, f->disc);
            else