[AD] Docs fail to build (make_doc.c)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



Hi guys,

In latest git, system.html fails to build correctly due to a bug in make_doc.c. The allegro5.cfg file is opened in "r" mode and not "rb" mode, so ftell does not correctly report the length of the file and it causes it to abort when building system.html.

Patch attached.



 docs/scripts/make_doc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/scripts/make_doc.c b/docs/scripts/make_doc.c
index ba3d029..5075f70 100644
--- a/docs/scripts/make_doc.c
+++ b/docs/scripts/make_doc.c
@@ -158,7 +158,7 @@ static void load_prototypes(const char *filename)
 
 char *load_allegro5_cfg(void)
 {
-   FILE *f = fopen(allegro5_cfg_filename, "r");
+   FILE *f = fopen(allegro5_cfg_filename, "rb");
    if (!f) {
       d_abort("could not open file for reading: ", allegro5_cfg_filename);
    }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/