diff --git a/jinclude.h b/jinclude.h index e8d983ac..56e7a4b2 100644 --- a/jinclude.h +++ b/jinclude.h @@ -4,7 +4,7 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1994, Thomas G. Lane. * libjpeg-turbo Modifications: - * Copyright (C) 2022, D. R. Commander. + * Copyright (C) 2022-2023, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * @@ -123,6 +123,8 @@ static INLINE int GETENV_S(char *buffer, size_t buffer_size, const char *name) #else +#include + /* This provides a similar interface to the Microsoft _putenv_s() function, but * other than parameter validation, it has no advantages over setenv(). */ diff --git a/strtest.c b/strtest.c index 88b568c9..3d5e004c 100644 --- a/strtest.c +++ b/strtest.c @@ -1,5 +1,5 @@ /* - * Copyright (C)2022 D. R. Commander. All Rights Reserved. + * Copyright (C)2022-2023 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -55,8 +55,12 @@ void invalid_parameter_handler(const wchar_t *expression, int main(int argc, char **argv) { +#if !defined(NO_GETENV) || !defined(NO_PUTENV) int err; +#endif +#ifndef NO_GETENV char env[3]; +#endif #ifdef _MSC_VER _set_invalid_parameter_handler(invalid_parameter_handler);