Skip to content
Permalink
Browse files

Add check for the unistd.h header file and use this define

  • Loading branch information...
alesliehughes committed Jun 14, 2010
1 parent a134834 commit 0422a2a2fb8dc077685ca68578f607676eba7324
Showing with 62 additions and 57 deletions.
  1. +4 −2 SConstruct
  2. +3 −6 blockhost.c
  3. +3 −6 cjob.c
  4. +3 −6 compinfo.c
  5. +3 −6 ctask.c
  6. +3 −6 jobfinfo.c
  7. +3 −6 jobinfo.c
  8. +4 −1 libdrqueue/communications.c
  9. +4 −2 libdrqueue/computer_info.c
  10. +4 −1 libdrqueue/computer_status.c
  11. +2 −2 libdrqueue/database.c
  12. +2 −2 libdrqueue/jobscript.c
  13. +6 −4 libdrqueue/logger.c
  14. +4 −1 libdrqueue/request.c
  15. +4 −0 master.c
  16. +3 −6 requeue.c
  17. +3 −0 sendjob.cpp
  18. +4 −0 slave.c
@@ -108,9 +108,11 @@ Help(opts.GenerateHelpText(env_lib))
# fetch Git commit id and write into git_rev.h
write_git_rev(get_git_commit())

#conf = Configure(env_lib)
conf = Configure(env_lib)
# FIXME: write configure tests
#env_lib = conf.Finish()
if conf.CheckCHeader('unistd.h'):
conf.env.Append(CPPDEFINES = Split ('-DHAVE_UNISTD_H'))
env_lib = conf.Finish()

# Installation paths
idir_prefix = os.path.normpath(os.path.join('${DESTDIR}','${PREFIX}','drqueue'))
@@ -21,13 +21,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

9 cjob.c
@@ -21,13 +21,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

@@ -21,13 +21,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

@@ -20,13 +20,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

@@ -25,13 +25,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

@@ -20,13 +20,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

@@ -20,9 +20,12 @@
//
#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifndef _WIN32
#include <netdb.h>
#include <unistd.h>
#else
#include <winsock2.h>
#define socklen_t int
@@ -18,8 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//

#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -28,6 +26,10 @@
#include <stdint.h>
#include <logger.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef __IRIX
#include <sys/sysmp.h>
#endif
@@ -20,10 +20,13 @@
//

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <ctype.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <stdlib.h>
#endif

#if defined(__LINUX)
# include <stdint.h>
@@ -23,8 +23,8 @@
#include <sys/stat.h>
#include <fcntl.h>

#ifndef _WIN32
#include <unistd.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include "pointer.h"
@@ -22,8 +22,8 @@
#include <stdio.h>
#include <sys/stat.h>

#ifndef _WIN32
#include <unistd.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include "libdrqueue.h"
@@ -24,10 +24,12 @@
#include <fcntl.h>
#include <sys/stat.h>

#ifndef _WIN32
#include <unistd.h>
#else
#include <process.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef _WIN32
#include <process.h>
#endif

#include "libdrqueue.h"
@@ -23,11 +23,14 @@
#include <stdio.h>
#include <signal.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifndef _WIN32
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/shm.h>
#else
#include <io.h>
@@ -23,7 +23,11 @@

#include <stdio.h>
#include <sys/types.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
@@ -21,13 +21,10 @@
//

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <ctype.h>
#endif

#include "libdrqueue.h"

@@ -26,7 +26,10 @@
#include <fstream>
#include <iostream>
#include <string>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#if defined (__IRIX)
#include <sys/types.h>
@@ -26,7 +26,11 @@
#endif

#include <stdio.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <signal.h>
#include <sys/ipc.h>
#include <sys/shm.h>

0 comments on commit 0422a2a

Please sign in to comment.
You can’t perform that action at this time.