Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] build problems, latest CVS..

Date2009-02-28 08:36
Fromvictor
SubjectRe: [Cs-dev] build problems, latest CVS..
Could you wrap it with #ifdefs?
----- Original Message ----- 
From: "Anthony Kozar" 
To: "New Csound Developer list" 
Sent: Saturday, February 28, 2009 8:28 AM
Subject: Re: [Cs-dev] build problems, latest CVS..


>I cannot build syncgrain.c on OS X (10.5) without removing this line:
>
> #include 
>
> I don't think it's necessary with #include  in there.
>
> Is it OK for me to commit this change?
>
> Anthony
>
> victor wrote on 2/15/09 3:20 PM:
>
>> Looks like what  does now. I did not change
>> that because I can't test it right now.
>
>> ----- Original Message -----
>> From: "Anthony Kozar"
>> To: "New Csound Developer list" 
>> Sent: Sunday, February 15, 2009 8:10 PM
>> Subject: Re: [Cs-dev] build problems, latest CVS..
>>
>>
>>> Looks like Victor fixed this, but I have another question.
>>>
>>> What is  ?  I don't think I have such a header here.
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the 
> Enterprise
> -Strategies to boost innovation and cut costs with open source 
> participation
> -Receive a $600 discount off the registration fee with the source code: 
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-28 21:27
FromAnthony Kozar
SubjectRe: [Cs-dev] build problems, latest CVS..
I could use #ifdefs, but since there is no way in C to say "try to include
 and if that fails, try ", it seems likely to be a
problem for other systems too.  I searched online and  is not
present on at least OS X, other BSDs, and Mac Classic.   is ANSI C
and the GNU C library version of  has this comment in it:

/* This interface is obsolete.  New programs should use
    and/or  instead of .  */

This is such a minor issue to fuss over but here are three possible ways to
change the file:

1)  #if  !(defined(__MACH__) && defined(__APPLE__)) && !defined(mac_classic)
      #include 
    #endif

2)  Add a configure step to test for values.h and then
    #ifdef HAVE_VALUES_H
      #include 
    #endif

3)  Remove #include  and replace all occurrences of MAXINT with
    INT_MAX.  (ANSI C)

In my opinion, #3 is the best and #1 the worst, but I do not want to change
your code without your permission.

-- Anthony

References:






victor wrote on 2/28/09 3:36 AM:

> Could you wrap it with #ifdefs?

> ----- Original Message -----
> From: "Anthony Kozar"
> To: "New Csound Developer list" 
> Sent: Saturday, February 28, 2009 8:28 AM
> Subject: Re: [Cs-dev] build problems, latest CVS..
> 
> 
>> I cannot build syncgrain.c on OS X (10.5) without removing this line:
>> 
>> #include 
>> 
>> I don't think it's necessary with #include  in there.
>> 
>> Is it OK for me to commit this change?


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net