Hi,
I also had problems with AF_INET not defined. It was due to the F or GS
prefix in the macro, which seems to have changed from 3.0->3.2. I tried
fixing it in the code (see the latest
commits in sockets.cc). The fix is quite ugly and works for me, but I
would be glad if someone else on a platform!=debian tries it. See my
request for comment on mail "versio macros" from August 27:th on the
oct-dev mailing list.

I also updated the documentation so it says more than "see man page".

Please try with the latest version from the repository, and tell me (and
the oct-dev list) if it worked.

Thanks,
Paul Sundvall

John Swensen skrev:
> On Sep 1, 2009, at 2:38 PM, Benjamin Lindner wrote:
> 
>> [email protected] wrote:
>>> Bug report for Octave 3.2.2 configured for i686-pc-mingw32
>>>
>>> Description:
>>> -----------
>>>
>>> I have installed Octave with sockets package and run simple script  
>>> for
>>> testing sockets. I get the following error:
>>>
>>> error: `AF_INET' undefined near line 10 column 17
>>> error: evaluating argument list element number 1
>>> error: evaluating argument list element number 1
>>> error: called from:
>>> error:   simpletest1.m at line 10, column 8
>>>
>>> Repeat-By:
>>> ---------
>>>
>>> The content of simpletest1.m file:
>>>
>>> clear all
>>> close all
>>>
>>>
>>> page_screen_output(0);
>>> fail = 0;
>>>
>>> # Create the sockets
>>> ## Server socket
>>> server = socket(AF_INET, SOCK_STREAM, 0);
>>> if ( server < 0 )
>>>   ++fail;
>>> %    return
>>> end
>>>
>> I'm not an expert on the sockets topic, but you did indeed not define
>> the variable AF_INET in your simpletest1.m script, so you are  
>> getting an
>> "undefined" error.
>> What value is AF_INET supposed to hold?
>>
>> benjamin
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and  
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Octave-dev mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/octave-dev
> 
> When I originally wrote this, I think all these things were defined in  
> the PKG_ADD function.  Then I think someone suggested I move them into  
> the .cc file as DEFUNX_DLD calls.  In fact, there is a macro in there  
> as follows
> 
> // This macro must start with DEFUN_DLD so that the automatic collection
> // of function helps can take place.
> #define DEFUN_DLD_SOCKET_CONSTANT(name, help ) \
> DEFUNX_DLD ( #name, F ## name, FS ## name, args, nargout, help) \
> { return octave_value( name ); };
> 
> 
> It does seem strange that the readline autocompletion thinks that  
> AF_INET exists, but I get the same error when trying to access it.  If  
> you are in a bind, you can look at the <sys/socket.h> header file and  
> use the integer equivalent.  If someone has a suggestion on how to fix  
> this, I will make the changes.  I also promise to fix the  
> documentation so it says something better than "See the socket() man  
> pages".
> 
> John Swensen
> 
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Octave-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/octave-dev

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to