Closed BrunoPosa closed 2 months ago
single_q(), doubleq(), handle_env_variable() have 5 args instead of 4
TLDR: we should prefix some or all our Macros, e.g.: FILE --> SHL_FILE
GPT explains: The macros you defined might potentially conflict with macros in standard libraries or popular headers. Here’s a breakdown of the most commonly used ones that might cause issues and some suggestions on how to handle them:
Common Macros in Standard Headers
SUCCESS and FAILURE: These are common macros that might conflict with other headers or libraries. For example, SUCCESS is sometimes defined as 0 in various libraries, and FAILURE is often defined as a non-zero value (often -1 or 1).
FILE: This is a critical one because FILE is a standard type in C, defined in
Recommendations
To avoid potential conflicts, you can:
Namespace Your Macros: Prefix your macros with a unique identifier related to your project or application. For example:
#define MYAPP_SUCCESS 0
#define MYAPP_FAILURE 1
#define MYAPP_FILE 55
#define MYAPP_ERR "Error\n"
Check Existing Libraries: Check the headers of any libraries you’re using to see if any of these macros are already defined. If they are, consider renaming your macros or using #undef to undefine the conflicting macro before your definition.
Closing issue: formatting done since commit 58b08b1f352fa771898701a5495f81d81f2a514c
Last chore before submitting to vogsphere - Ensure the 42header authors are correct