Stephen-McDaniel / rpostgresql

This repository is an export of the final version from the retired Google Code system (code.google.com/p/rpostgresql).
0 stars 0 forks source link

compilatioin error for pid_t #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile R with intel compilers
2. install R
3. try to make RPostgreSQL with
R CMD INSTALL RPostgreSQL

What is the expected output? What do you see instead?
...
* DONE (RPostgreSQL)

What version of the product are you using? On what operating system?
RPostgreSQL_0.1-6.tar.gz from CRAN or latest from svn today.
with R-2.11.1
on CentOS 5.5

compilation failed with error message below.

icc -std=c99 -I/usr/local/lib64/R/include -I/usr/include -I/usr/local/include  
-mp  -fpic  -g -O2 -std=c99 -c RS-DBI.c -o RS-DBI.o
icc: command line remark #10010: option '-mp' is deprecated and will be removed 
in a future release. See '-help deprecated'
RS-DBI.h(42): error: identifier "pid_t" is undefined
      pid_t getpid();
      ^

Please provide any additional information below.

man getpid on this system said
SYNOPSIS
       #include <sys/types.h>
       #include <unistd.h>

So, #include <sys/types.h> will resolve this problem.

Original issue reported on code.google.com by tomoa...@kenroku.kanazawa-u.ac.jp on 9 Sep 2010 at 8:08

Attachments:

GoogleCodeExporter commented 9 years ago
This patch works fine on OS X.

Original comment by ne...@neiltiffin.com on 9 Sep 2010 at 4:42

GoogleCodeExporter commented 9 years ago
Yes, that looks good. Applied as SVN rev 135.

Original comment by dirk.eddelbuettel on 11 Sep 2010 at 2:00