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

Cygwin build fix #1200

Merged
merged 1 commit into from
Dec 14, 2024
Merged

Cygwin build fix #1200

merged 1 commit into from
Dec 14, 2024

Conversation

landswellsong
Copy link
Contributor

Ensures strtod_l is provided which is normally hidden for non-GNU source

Ensures strtod_l is provided
@Saleh-At
Copy link

Saleh-At commented Nov 29, 2024

add these on top of file "jsbsim\src\input_output\string_utilities.cpp"

#define _GNU_SOURCE
#include <_ansi.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <cstdlib>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <iostream>
#include <sstream>
#include <stdio.h>

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.96%. Comparing base (f6ae92e) to head (d2a4e7b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1200   +/-   ##
=======================================
  Coverage   24.96%   24.96%           
=======================================
  Files         170      170           
  Lines       19283    19283           
=======================================
  Hits         4814     4814           
  Misses      14469    14469           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bcoconni
Copy link
Member

bcoconni commented Dec 8, 2024

@landswellsong, @Saleh-At I'm not sure I'm understanding your request ? Is the PR in its current form complete for the compilation of JSBSim with CygWin or should some further changes be added ?

Please note that some headers are appearing twice in @Saleh-At suggestion (errno.h, stdlib.h, stdio.h, …) and would the PR be modified to include these additional headers then please remove redundant code and update the #ifdef __CYGWIN__ accordingly to avoid polluting the other compilers.

Thanks for the PR.

@landswellsong
Copy link
Contributor Author

@bcoconni it works for me as is without additional headers, just the commit which I've sent. I'm unsure why do any additional headers need to be included, it seemed to have only be a problem with one particular unit file.

@bcoconni bcoconni merged commit 2bdf0d4 into JSBSim-Team:master Dec 14, 2024
29 checks passed
@bcoconni
Copy link
Member

PR merged. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants