<HTML><BODY>As I checked _POSIX_C_SOURCE yesterday, it doesn't work on OSX.<br>Also we are already using _GNU_SOURCE flag in <em>src/box/lua/info.c</em> and i<span>n various third-party modules.</span><br><br>I can use cmake, but again I think there are two options:<br>1. Using getline with _GNU_SOURCE flag as in man example.<br>2. Get rid of getline<br><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">
        Среда,  7 марта 2018, 13:16 +03:00 от Konstantin Osipov <kostja@tarantool.org>:<br>
        <br>
        <div id="">




        
                
        



        



        



        



        



        



        



        

















        




























        
        
        






















































        


































        



        
                
        

















































        



        




































        











































        

























































        




















































































        






        
        









        
        
        
        
        
                
                
                
                
        








































        
        

        
                
                
                
                
        

        

        
        
        



        






















        
        
        
        
        
        
        
        







































        





        
        
        
        
        
        
        
        





        



        



































        



































<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                <base target="_self" href="https://e.mail.ru/">
                
            <div id="style_15204177800000000178_BODY">* Konstantin Belyavskiy <<a href="mailto:k.belyavskiy@tarantool.org">k.belyavskiy@tarantool.org</a>> [18/03/07 12:06]:<br>
<div class="mail-quote-collapse">> >* Konstantin Osipov < <a href="mailto:kostja@tarantool.org">kostja@tarantool.org</a> > [18/03/06 21:38]:<br>
> >> Please avoid doing this in say.c, add compile definitions in<br>
> >> cmake, or use sscanf instead of getline(). <br>
> ><br>
> >snscanf()<br>
> There is no standard function snscanf<br>
> And why should I not using macro?<br>
</div><br>
The policy for compile-time defines is that they should be either<br>
in trivia/config.h, if they are project-global, or in cmake file<br>
flags if they are executable-local.<br>
<br>
The trouble with the approach which you employed is that, when<br>
used systematically, it can blow up on a new platform or with an<br>
upgrade. <br>
<br>
The second thing is that we should not make our code GNU-toolchain<br>
dependent.<br>
<br>
Looks like getline is part of POSIX 2008, so it's better to use a<br>
standard define, such as _POSIX_C_SOURCE .<br>
<br>
If you can't use sscanf, why not use fgets()?<br>
<br>
-- <br>
Konstantin Osipov, Moscow, Russia, <span class="js-phone-number">+7 903 626 22 32</span><br>
<a href="http://tarantool.org" target="_blank">http://tarantool.org</a> - <a href="http://www.twitter.com/kostja_osipov" target="_blank">www.twitter.com/kostja_osipov</a><br>
</div>
            
        
                <base target="_self" href="https://e.mail.ru/">
        </div>

        
</div>


</div>
</blockquote>
<br>
<br>Best regards,<br>Konstantin Belyavskiy<br>k.belyavskiy@tarantool.org<br></BODY></HTML>