Am Sat, 12 Dec 2020 22:17:48 +0100
schrieb Kornel Benko <kor...@lyx.org>:

> Am Sat, 12 Dec 2020 20:49:55 +0000
> schrieb José Abílio Matos <jama...@lyx.org>:
> 
> > On Saturday, December 12, 2020 8:30:41 PM WET Kornel Benko wrote:  
> > > This one is declared in "string.h" (so not c++?)
> > > 
> > >         Kornel  
> > 
> > #include "cstring"
> > 
> > is the more C++-ish way to include it.
> > 
> > 
> > The first lines in gcc 10, the version I have here, corresponding file are 
> > quite instructive:
> > 
> > #pragma GCC system_header
> > 
> > #include <bits/c++config.h>
> > #include <string.h>
> > 
> > #ifndef _GLIBCXX_CSTRING
> > #define _GLIBCXX_CSTRING 1
> > 
> > // Get rid of those macros defined in <string.h> in lieu of real functions.
> > #undef memchr
> > ...
> > 
> > After this point it undefines a lot of macro and then replaces it by real 
> > functions. As an example consider the first macro to be removed the 
> > corresponding code then becomes:
> > 
> > extern "C++"
> > {
> > namespace std _GLIBCXX_VISIBILITY(default)
> > {
> >   using ::memchr;
> > ...
> >   
> 
> OK, next error:
> /usr2/src/lyx/lyx-git/src/Server.cpp: In member function ‘int
> lyx::LyXComm::startPipe(const string&, bool)’:
> /usr2/src/lyx/lyx-git/src/Server.cpp:816:7: error: ‘::close’ has not been 
> declared
>      ::close(fd);
>        ^~~~~
> /usr2/src/lyx/lyx-git/src/Server.cpp:816:7: note: suggested alternative: 
> ‘pclose’
>      ::close(fd);
>        ^~~~~
>        pclose
> /usr2/src/lyx/lyx-git/src/Server.cpp: In member function ‘void
> lyx::LyXComm::endPipe(int&, const string&, bool)’:
> /usr2/src/lyx/lyx-git/src/Server.cpp:884:8: error: ‘::close’ has not been 
> declared
>   if (::close(fd) < 0) {
>         ^~~~~
> /usr2/src/lyx/lyx-git/src/Server.cpp:884:8: note: suggested alternative: 
> ‘pclose’
>   if (::close(fd) < 0) {
>         ^~~~~
>         pclose
> ...
> and more. Missing 'cstdio'
> 
>       Kornel
> 

This time maybe 'unistd.h'

        Kornel

Attachment: pgpuiBI80RRiL.pgp
Description: Digitale Signatur von OpenPGP

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to