Re: [boinc_dev] Finding BOINC API from a build system

2009-06-19 Thread Gábor Gombás
Hi!

On Tue, Jun 16, 2009 at 02:00:56PM -0700, David Anderson wrote:

> I factored out the OS fixes into a separate .h file (str_replace.h),
> so str_util.h no longer includes config.h

Here are some further updates to the installed headers.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-17 Thread Jeremy Cowles
This compiled fine under Arch. It seems the create_project script is still
trying to copy pymw_assimilator. I will fix this.

On Tue, Jun 16, 2009 at 4:02 PM, David Anderson wrote:

> I checked in a different solution, which I tested on Win and FC10;
> please try building on other platforms.
>
> -- David
>
>
> Jeremy Cowles wrote:
>
>> Does this still need to be tested? I can try the patch on Arch if you
>> want.
>>
>
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread David Anderson
I checked in a different solution, which I tested on Win and FC10;
please try building on other platforms.

-- David

Jeremy Cowles wrote:
> Does this still need to be tested? 
> I can try the patch on Arch if you want. 
> 
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Jeremy Cowles
Does this still need to be tested? I can try the patch on Arch if you want.

2009/6/16 Gabor Gombas 

> On Tue, Jun 16, 2009 at 11:51:52AM -0300, Nicolás Alvarez wrote:
>
> >> What is the error message? The correct fix is to include config.h from
> >> every C/C++ source files, and never from headers.
> >
> > http://boinc.berkeley.edu/trac/ticket/908
>
> Could you try this patch? It does not address str_util.h yet, but it
> should solve the build error.
>
> Gabor
>
> commit a5008e5a53ebd69c46bd7b42ad0432f73fb8acaa
> Author: Gábor Gombás 
> Date:   Tue Jun 16 17:49:36 2009 +0200
>
>Include config.h from every C++ source file
>
>Also add the usual #ifdef HAVE_CONFIG_H surrounding.
>
> diff --git a/sched/assimilator.cpp b/sched/assimilator.cpp
> index 6cc251d..ce40c13 100644
> --- a/sched/assimilator.cpp
> +++ b/sched/assimilator.cpp
> @@ -21,7 +21,10 @@
>  // in order to make a complete program.
>  //
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/sched/census.cpp b/sched/census.cpp
> index f8e5b33..11cf1d0 100644
> --- a/sched/census.cpp
> +++ b/sched/census.cpp
> @@ -20,6 +20,10 @@
>  // This info is used the feeder to decide how many shared-memory slots
>  // to devote to each HR class.
>
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>
>  #include "boinc_db.h"
> diff --git a/sched/db_dump.cpp b/sched/db_dump.cpp
> index edeb204..957c5c6 100644
> --- a/sched/db_dump.cpp
> +++ b/sched/db_dump.cpp
> @@ -22,7 +22,10 @@
>  // All projects export stats in the same format,
>  // as described in the default db_dump_spec.xml that is created for you.
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/sched/db_purge.cpp b/sched/db_purge.cpp
> index 54a7662..3bb5fc9 100644
> --- a/sched/db_purge.cpp
> +++ b/sched/db_purge.cpp
> @@ -30,7 +30,10 @@
>  // In addition there are index files associating each WU and result ID
>  // with the timestamp of the file it's in.
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/sched/delete_file.cpp b/sched/delete_file.cpp
> index 0a0938b..4b1b968 100644
> --- a/sched/delete_file.cpp
> +++ b/sched/delete_file.cpp
> @@ -24,7 +24,10 @@
>  //
>  // Run from the project root dir
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #if HAVE_UNISTD_H
>  #include 
> diff --git a/sched/edf_sim.cpp b/sched/edf_sim.cpp
> index fa7c2cc..835b868 100644
> --- a/sched/edf_sim.cpp
> +++ b/sched/edf_sim.cpp
> @@ -15,6 +15,10 @@
>  // You should have received a copy of the GNU Lesser General Public
> License
>  // along with BOINC.  If not, see .
>
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #ifndef SIM
>  #include "sched_config.h"
>  #include "sched_msgs.h"
> diff --git a/sched/feeder.cpp b/sched/feeder.cpp
> index ab10e3c..bacd5f8 100644
> --- a/sched/feeder.cpp
> +++ b/sched/feeder.cpp
> @@ -89,7 +89,10 @@
>  // configuration, or decrease the MAX_PLATFORMS, MAX_APPS
>  // MAX_APP_VERSIONS, and MAX_WU_RESULTS in sched_shmem.h
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/sched/file_deleter.cpp b/sched/file_deleter.cpp
> index c7f5c3f..4882b5a 100644
> --- a/sched/file_deleter.cpp
> +++ b/sched/file_deleter.cpp
> @@ -34,7 +34,10 @@
>  //
>  #define ERROR_INTERVAL  3600
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp
> index ac60aac..0157acc 100644
> --- a/sched/file_upload_handler.cpp
> +++ b/sched/file_upload_handler.cpp
> @@ -19,7 +19,10 @@
>  // See doc/upload.php for protocol spec.
>  //
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/sched/get_file.cpp b/sched/get_file.cpp
> index 4097a5b..05907e3 100644
> --- a/sched/get_file.cpp
> +++ b/sched/get_file.cpp
> @@ -24,7 +24,9 @@
>  //
>  // Run from the project root dir.
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
>
>  #if HAVE_UNISTD_H
>  #include 
> diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp
> index b62f019..8b0efe4 100644
> --- a/sched/handle_request.cpp
> +++ b/sched/handle_request.cpp
> @@ -17,7 +17,10 @@
>
>  // Handle a scheduling server RPC
>
> -#include "config.h"
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
>  #ifdef _USING_FCGI_
>  #include "boinc_fcgi.h"
>  #else
> diff --git a/sched/hr.cpp b/sched/hr.cpp
> index 03dfac4..b2c70cf 100644
> --- a/sched/hr.cpp
> +++ b/sched/hr.cpp
> @@ -15,6 +15,10 @@
>  // You should have received a copy of the GNU Lesser General Public
> License
>  // along with BOINC.  If not, see 

Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread David Anderson
Gabor Gombas wrote:

> 
> Anyway, I'll look into str_util.h. It is messy to mix public API with
> OS fixups.

I factored out the OS fixes into a separate .h file (str_replace.h),
so str_util.h no longer includes config.h

-- David
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Nicolás Alvarez
El Martes 16 Jun 2009 12:58:31 Gabor Gombas escribió:
> On Tue, Jun 16, 2009 at 11:51:52AM -0300, Nicolás Alvarez wrote:
> >> What is the error message? The correct fix is to include config.h from
> >> every C/C++ source files, and never from headers.
> >
> > http://boinc.berkeley.edu/trac/ticket/908
>
> Could you try this patch? It does not address str_util.h yet, but it
> should solve the build error.

I never had that build error myself; I don't run Arch.
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Gabor Gombas
On Tue, Jun 16, 2009 at 11:51:52AM -0300, Nicolás Alvarez wrote:

>> What is the error message? The correct fix is to include config.h from
>> every C/C++ source files, and never from headers.
>
> http://boinc.berkeley.edu/trac/ticket/908

Could you try this patch? It does not address str_util.h yet, but it
should solve the build error.

Gabor

commit a5008e5a53ebd69c46bd7b42ad0432f73fb8acaa
Author: Gábor Gombás 
Date:   Tue Jun 16 17:49:36 2009 +0200

Include config.h from every C++ source file

Also add the usual #ifdef HAVE_CONFIG_H surrounding.

diff --git a/sched/assimilator.cpp b/sched/assimilator.cpp
index 6cc251d..ce40c13 100644
--- a/sched/assimilator.cpp
+++ b/sched/assimilator.cpp
@@ -21,7 +21,10 @@
 // in order to make a complete program.
 //
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sched/census.cpp b/sched/census.cpp
index f8e5b33..11cf1d0 100644
--- a/sched/census.cpp
+++ b/sched/census.cpp
@@ -20,6 +20,10 @@
 // This info is used the feeder to decide how many shared-memory slots
 // to devote to each HR class.
 
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 
 #include "boinc_db.h"
diff --git a/sched/db_dump.cpp b/sched/db_dump.cpp
index edeb204..957c5c6 100644
--- a/sched/db_dump.cpp
+++ b/sched/db_dump.cpp
@@ -22,7 +22,10 @@
 // All projects export stats in the same format,
 // as described in the default db_dump_spec.xml that is created for you.
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sched/db_purge.cpp b/sched/db_purge.cpp
index 54a7662..3bb5fc9 100644
--- a/sched/db_purge.cpp
+++ b/sched/db_purge.cpp
@@ -30,7 +30,10 @@
 // In addition there are index files associating each WU and result ID
 // with the timestamp of the file it's in.
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sched/delete_file.cpp b/sched/delete_file.cpp
index 0a0938b..4b1b968 100644
--- a/sched/delete_file.cpp
+++ b/sched/delete_file.cpp
@@ -24,7 +24,10 @@
 //
 // Run from the project root dir
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #if HAVE_UNISTD_H
 #include 
diff --git a/sched/edf_sim.cpp b/sched/edf_sim.cpp
index fa7c2cc..835b868 100644
--- a/sched/edf_sim.cpp
+++ b/sched/edf_sim.cpp
@@ -15,6 +15,10 @@
 // You should have received a copy of the GNU Lesser General Public License
 // along with BOINC.  If not, see .
 
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #ifndef SIM
 #include "sched_config.h"
 #include "sched_msgs.h"
diff --git a/sched/feeder.cpp b/sched/feeder.cpp
index ab10e3c..bacd5f8 100644
--- a/sched/feeder.cpp
+++ b/sched/feeder.cpp
@@ -89,7 +89,10 @@
 // configuration, or decrease the MAX_PLATFORMS, MAX_APPS
 // MAX_APP_VERSIONS, and MAX_WU_RESULTS in sched_shmem.h
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sched/file_deleter.cpp b/sched/file_deleter.cpp
index c7f5c3f..4882b5a 100644
--- a/sched/file_deleter.cpp
+++ b/sched/file_deleter.cpp
@@ -34,7 +34,10 @@
 //
 #define ERROR_INTERVAL  3600
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp
index ac60aac..0157acc 100644
--- a/sched/file_upload_handler.cpp
+++ b/sched/file_upload_handler.cpp
@@ -19,7 +19,10 @@
 // See doc/upload.php for protocol spec.
 //
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
diff --git a/sched/get_file.cpp b/sched/get_file.cpp
index 4097a5b..05907e3 100644
--- a/sched/get_file.cpp
+++ b/sched/get_file.cpp
@@ -24,7 +24,9 @@
 //
 // Run from the project root dir.
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
 
 #if HAVE_UNISTD_H
 #include 
diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp
index b62f019..8b0efe4 100644
--- a/sched/handle_request.cpp
+++ b/sched/handle_request.cpp
@@ -17,7 +17,10 @@
 
 // Handle a scheduling server RPC
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #ifdef _USING_FCGI_
 #include "boinc_fcgi.h"
 #else
diff --git a/sched/hr.cpp b/sched/hr.cpp
index 03dfac4..b2c70cf 100644
--- a/sched/hr.cpp
+++ b/sched/hr.cpp
@@ -15,6 +15,10 @@
 // You should have received a copy of the GNU Lesser General Public License
 // along with BOINC.  If not, see .
 
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include "error_numbers.h"
 #include "str_util.h"
 
diff --git a/sched/hr_info.cpp b/sched/hr_info.cpp
index 87271f6..fe48dcb 100644
--- a/sched/hr_info.cpp
+++ b/sched/hr_info.cpp
@@ -14,6 +14,11 @@
 //
 // You should have received a copy of the GNU Lesser General Public License
 // along with BOINC.  If not, see .
+
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #ifndef _

Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Nicolás Alvarez

El 16/06/2009, a las 11:41, Gabor Gombas  escribió:


Hi!

On Tue, Jun 16, 2009 at 11:06:37AM -0300, Nicolás Alvarez wrote:

Ok, here are a set of patches that removes config.h from the  
installed

headers. I've only tested it on Linux.


There is currently a build error on archlinux, solved by including
config.h in str_util.h. That header uses HAVE_* defines.


What is the error message? The correct fix is to include config.h from
every C/C++ source files, and never from headers.


http://boinc.berkeley.edu/trac/ticket/908


Anyway, I'll look into str_util.h. It is messy to mix public API with
OS fixups.

Gabor

--
   -
   MTA SZTAKI Computer and Automation Research Institute
  Hungarian Academy of Sciences
   -


___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Gabor Gombas
Hi!

On Tue, Jun 16, 2009 at 11:06:37AM -0300, Nicolás Alvarez wrote:

>> Ok, here are a set of patches that removes config.h from the installed
>> headers. I've only tested it on Linux.
>
> There is currently a build error on archlinux, solved by including  
> config.h in str_util.h. That header uses HAVE_* defines.

What is the error message? The correct fix is to include config.h from
every C/C++ source files, and never from headers.

Anyway, I'll look into str_util.h. It is messy to mix public API with
OS fixups.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Nicolás Alvarez

El 16/06/2009, a las 08:05, Gabor Gombas  escribió:


On Mon, Jun 15, 2009 at 11:49:42AM -0300, Nicolás Alvarez wrote:


Why do you want to find it? You should never use config.h from some
other project in your program. It usually is a bad idea to install
config.h and reference config.h from public headers.


parse.h includes it, and probably others. I get a build error if I  
don't
add the path to config.h to the search path  for include files  
(with -I).


Ok, here are a set of patches that removes config.h from the installed
headers. I've only tested it on Linux.


There is currently a build error on archlinux, solved by including  
config.h in str_util.h. That header uses HAVE_* defines.



Gabor

--
-
MTA SZTAKI Computer and Automation Research Institute
   Hungarian Academy of Sciences
-
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Re: [boinc_dev] Finding BOINC API from a build system

2009-06-16 Thread Gabor Gombas
On Mon, Jun 15, 2009 at 11:49:42AM -0300, Nicolás Alvarez wrote:

>> Why do you want to find it? You should never use config.h from some
>> other project in your program. It usually is a bad idea to install
>> config.h and reference config.h from public headers.
>
> parse.h includes it, and probably others. I get a build error if I don't 
> add the path to config.h to the search path  for include files (with -I).

Ok, here are a set of patches that removes config.h from the installed
headers. I've only tested it on Linux.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.


Re: [boinc_dev] Finding BOINC API from a build system

2009-06-15 Thread Nicolás Alvarez

El 15/06/2009, a las 08:48, Gabor Gombas  escribió:


On Sun, Jun 14, 2009 at 10:01:26PM -0300, Nicolás Alvarez wrote:

However, how do I find BOINC's config.h? If I look in the global  
search paths,
I might end up finding the config.h from some other completely  
different
program (like /usr/include/wx-2.8/wx/config.h if that happened to  
be in the

path).


Why do you want to find it? You should never use config.h from some
other project in your program. It usually is a bad idea to install
config.h and reference config.h from public headers.


parse.h includes it, and probably others. I get a build error if I  
don't add the path to config.h to the search path  for include files  
(with -I).



I haven't checked, but if BOINC puts something in its config.h that
applications should also use, then it must be moved to some other  
header
with an unique name. You can use the AC_CONFIG_COMMANDS() autoconf  
macro

to generate such a header.

Gabor

--
-
MTA SZTAKI Computer and Automation Research Institute
   Hungarian Academy of Sciences
-
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Re: [boinc_dev] Finding BOINC API from a build system

2009-06-15 Thread Gabor Gombas
On Sun, Jun 14, 2009 at 10:01:26PM -0300, Nicolás Alvarez wrote:

> However, how do I find BOINC's config.h? If I look in the global search 
> paths, 
> I might end up finding the config.h from some other completely different 
> program (like /usr/include/wx-2.8/wx/config.h if that happened to be in the 
> path).

Why do you want to find it? You should never use config.h from some
other project in your program. It usually is a bad idea to install
config.h and reference config.h from public headers.

I haven't checked, but if BOINC puts something in its config.h that
applications should also use, then it must be moved to some other header
with an unique name. You can use the AC_CONFIG_COMMANDS() autoconf macro
to generate such a header.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -
___
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.