Skip to content

Commit 46e796b

Browse files
author
luke
committed
Define USE_BASE_R_SUPPORT in Defn.h an use to mask some non-API declarations.
Also comment out declaration for rnbeta, which does not exist. git-svn-id: https://svn.r-project.org/R/trunk@89135 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 9df4b49 commit 46e796b

File tree

9 files changed

+21
-1
lines changed

9 files changed

+21
-1
lines changed

src/appl/uncmin.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
/*--- The Dennis + Schnabel Minimizer -- used by R's nlm() ---*/
2929

30+
#define USE_BASE_R_SUPPORT
3031
#include <math.h>
3132
#include <float.h> /* DBL_MAX */
3233
#include <R_ext/Boolean.h>

src/include/Defn.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#ifndef DEFN_H_
2424
#define DEFN_H_
2525

26+
// enable some non-API declarations in R_ext includes
27+
#define USE_BASE_R_SUPPORT
28+
2629
/* seems unused */
2730
#define COUNTING
2831

src/include/R_ext/Applic.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ void F77_NAME(dqrls)(double *x, int *n, int *p, double *y, int *ny,
121121
/* appl/pretty.c: for use in engine.c and util.c
122122
FIXME: move out of this header
123123
*/
124+
#ifdef USE_BASE_R_SUPPORT
124125
double R_pretty(double *lo, double *up, int *ndiv, int min_n,
125126
double shrink_sml, const double high_u_fact[],
126127
int eps_correction, int return_bounds);
128+
#endif
127129

128130
/* For use in package stats */
129131

@@ -135,9 +137,11 @@ typedef void (*fcn_p)(int, double *, double *, void *);
135137
/* type of pointer to the hessian functions */
136138
typedef void (*d2fcn_p)(int, int, double *, double *, void *);
137139

140+
#ifdef USE_BASE_R_SUPPORT
138141
void fdhess(int n, double *x, double fval, fcn_p fun, void *state,
139142
double *h, int nfd, double *step, double *f, int ndigit,
140143
double *typx);
144+
#endif
141145

142146
/* Also used in packages nlme, pcaPP */
143147
void optif9(int nr, int n, double *x,

src/include/R_ext/Error.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,17 @@ extern "C" {
5858
[[noreturn]] void Rf_error(const char *, ...) R_PRINTF_FORMAT(1, 2);
5959

6060
[[noreturn]] void UNIMPLEMENTED(const char *);
61+
#ifdef USE_BASE_R_SUPPORT
6162
[[noreturn]] void WrongArgCount(const char *);
63+
#endif
6264
#else
6365
NORET void Rf_error(const char *, ...) R_PRINTF_FORMAT(1, 2);
6466

6567
NORET void UNIMPLEMENTED(const char *);
68+
#ifdef USE_BASE_R_SUPPORT
6669
NORET void WrongArgCount(const char *);
6770
#endif
71+
#endif
6872

6973
void Rf_warning(const char *, ...) R_PRINTF_FORMAT(1,2);
7074

src/include/R_ext/Memory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ void* vmaxget(void); // not remapped
4545
void vmaxset(const void *); // not re-mapped
4646

4747
void R_gc(void);
48+
#ifdef USE_BASE_R_SUPPORT
4849
int R_gc_running(void);
50+
#endif
4951

5052
char* R_alloc(R_SIZE_T, int);
5153
long double *R_allocLD(R_SIZE_T nelem);

src/include/R_ext/Rdynload.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ Rboolean R_useDynamicSymbols(DllInfo *info, Rboolean value);
8686
Rboolean R_forceSymbols(DllInfo *info, Rboolean value);
8787

8888
/* Not API */
89+
#ifdef USE_BASE_R_SUPPORT
8990
DllInfo *R_getDllInfo(const char *name);
91+
#endif
9092

9193
/* To be used by applications embedding R to register their symbols
9294
that are not related to any dynamic module/

src/include/R_ext/eventloop.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ typedef struct _InputHandler {
7575
extern InputHandler *addInputHandler(InputHandler *handlers, int fd, InputHandlerProc handler, int activity);
7676
extern InputHandler *getInputHandler(InputHandler *handlers, int fd);
7777
extern int removeInputHandler(InputHandler **handlers, InputHandler *it);
78+
79+
#ifdef USE_BASE_R_SUPPORT
7880
extern InputHandler *getSelectedHandler(InputHandler *handlers, fd_set *mask);
7981
extern fd_set *R_checkActivity(int usec, int ignore_stdin);
8082
extern void R_runHandlers(InputHandler *handlers, fd_set *mask);
8183

8284
extern int R_SelectEx(int n, fd_set *readfds, fd_set *writefds,
8385
fd_set *exceptfds, struct timeval *timeout,
8486
void (*intr)(void));
87+
#endif
8588

8689
#ifdef __SYSTEM__
8790
#ifndef __cplusplus /* Would get duplicate conflicting symbols*/

src/include/Rmath.h0.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ double rlogis(double, double);
540540
double dnbeta(double, double, double, double, int);
541541
double pnbeta(double, double, double, double, int, int);
542542
double qnbeta(double, double, double, double, int, int);
543-
double rnbeta(double, double, double);
543+
//double rnbeta(double, double, double);
544544

545545
/* Non-central F Distribution */
546546

src/modules/internet/Rsock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ void in_Rsockwrite(int *sockp, char **buf, int *start, int *end, int *len)
184184
struct hostent *R_gethostbyname(const char *name);
185185

186186
#ifdef Unix
187+
#define USE_BASE_R_SUPPORT
187188
#include <R_ext/eventloop.h>
188189

189190
/* modified from src/unix/sys-std.c */

0 commit comments

Comments
 (0)