Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-14981 gurt: restore d_getenv_int undefined symbol #13622

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/gurt/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,21 @@ d_getenv_uint(const char *name, unsigned *uint_val)
return -DER_SUCCESS;
}

/**
* get an unsigned integer type environment variables.
*
* \param[in] name name of the environment variable.
* \param[in,out] uint_val returned value of the ENV. Will not change the original
* value if ENV is not set or set as a non-integer value.
* \return 0 on success, a negative value on error.
* \deprecated d_getenv_int() is deprecated, please use d_getenv_uint().
*/
int
d_getenv_int(const char *name, unsigned *uint_val)
{
return d_getenv_uint(name, uint_val);
}

/**
* get a 32bits unsigned integer type environment variables
*
Expand Down
10 changes: 3 additions & 7 deletions src/include/gurt/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ d_getenv_bool(const char *name, bool *bool_val);
int
d_getenv_char(const char *name, char *char_val);
int
d_getenv_int(const char *name, unsigned int *uint_val)
__attribute__((deprecated("use d_getenv_uint")));
int
d_getenv_uint(const char *name, unsigned int *uint_val);
int
d_getenv_uint32_t(const char *name, uint32_t *uint32_val);
Expand All @@ -601,13 +604,6 @@ d_unsetenv(const char *name);
int
d_clearenv(void);

static inline int
d_getenv_int(const char *name, unsigned int *uint_val)
{
D_WARN("d_getenv_int() is deprecated, please use d_getenv_uint()");
return d_getenv_uint(name, uint_val);
}

int
d_write_string_buffer(struct d_string_buffer_t *buf, const char *fmt, ...);
void
Expand Down