bug-myserver
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-myserver] Undeclared variable `gets' throws make error.


From: Michael Pagan
Subject: [bug-myserver] Undeclared variable `gets' throws make error.
Date: Thu, 19 May 2016 21:08:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hello MyServer developers!

I know nothing about servers, but I wanted to install GNU MyServer so
that I can host a new website using your server software; however, I
encountered the following error during `make':

    make[4]: Entering directory `/home/pagan/Desktop/progs/myserver-0.11/lib'
      CC     argp-ba.lo
      CC     argp-eexst.lo
    In file included from /usr/include/x86_64-linux-gnu/sys/types.h:219:0,
                     from ./stdio.h:60,
                     from argp.h:22,
                     from argp-eexst.c:25:
    ./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)
     _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
     ^
    make[4]: *** [argp-eexst.lo] Error 1
    ...

After reading the source code, I learned that `gets' is obsolete, and
that `fgets' is preferred.  I was able to bypass the error by commenting
out lines 690-700 in file `./lib/stdio.in.h', which removes all
programmatic mentions of `gets'.  Once the lines were commented out, I
ran `./configure; sudo make; sudo make install', and the compilation and
installation went just fine.  I'm not sure if this is the preferred
solution, but if it is: I've attached a patch for you to see what I
changed.

Yes, now I can say that I use an official GNU package as my server
software!  Thanks for all your hard work, and good documentation.  If I
run into any problems during my setup, I shall report back here.

I welcome your feedback,
Michael Pagan

690,691c690,691
< _GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
< _GL_CXXALIAS_RPL (gets, char *, (char *s));
---
> /*_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));*/
> /*_GL_CXXALIAS_RPL (gets, char *, (char *s));*/
693c693
< _GL_CXXALIAS_SYS (gets, char *, (char *s));
---
> /*_GL_CXXALIAS_SYS (gets, char *, (char *s));*/
696c696
< _GL_CXXALIASWARN (gets);
---
> /*_GL_CXXALIASWARN (gets);*/
700c700
< _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
---
> /*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");*/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]