fix.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. diff --git a/qd/cae/dyna_cpp/dyna/binout/lsda/l2amain.c b/qd/cae/dyna_cpp/dyna/binout/lsda/l2amain.c
  2. index 1d3b972..635187c 100644
  3. --- a/qd/cae/dyna_cpp/dyna/binout/lsda/l2amain.c
  4. +++ b/qd/cae/dyna_cpp/dyna/binout/lsda/l2amain.c
  5. @@ -1,10 +1,16 @@
  6. #include <ctype.h>
  7. +#ifdef __APPLE__
  8. +#include <stdlib.h>
  9. +#else
  10. #include <malloc.h>
  11. +#endif
  12. #include <math.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <string.h>
  16. +#if !defined _WIN32 && !defined WIN64 && !defined MPPWIN
  17. #include <unistd.h>
  18. +#endif
  19. #include "l2a_version.h"
  20. #include "lsda.h"
  21. @@ -192,7 +198,7 @@ main(int argc, char* argv[])
  22. int target = 0;
  23. int nopen, first, last;
  24. char* toopen[1024];
  25. -#ifdef MPPWIN
  26. +#if defined _WIN32 || defined WIN64 || defined MPPWIN
  27. int optind = 1;
  28. #else
  29. extern int optind, opterr, optopt;
  30. @@ -206,7 +212,7 @@ main(int argc, char* argv[])
  31. }
  32. use_jobid = 0;
  33. -#ifdef MPPWIN
  34. +#if defined _WIN32 || defined WIN64 || defined MPPWIN
  35. for (i = 1; i < argc; i++) {
  36. if (!strcmp(argv[i], "-h")) {
  37. print_help(argv[0]);
  38. @@ -248,7 +254,7 @@ main(int argc, char* argv[])
  39. */
  40. nopen = 0;
  41. for (i = optind; i < argc; i++) {
  42. -#ifdef MPPWIN
  43. +#if defined _WIN32 || defined WIN64 || defined MPPWIN
  44. if (!strcmp(argv[i], "-h"))
  45. continue;
  46. if (!strcmp(argv[i], "-j"))
  47. diff --git a/qd/cae/dyna_cpp/dyna/keyfile/ElementKeyword.hpp b/qd/cae/dyna_cpp/dyna/keyfile/ElementKeyword.hpp
  48. index 3affbb0..bbe6407 100644
  49. --- a/qd/cae/dyna_cpp/dyna/keyfile/ElementKeyword.hpp
  50. +++ b/qd/cae/dyna_cpp/dyna/keyfile/ElementKeyword.hpp
  51. @@ -48,13 +48,13 @@ public:
  52. T _id,
  53. T _part_id,
  54. const std::vector<int32_t>& _node_ids,
  55. - const std::vector<std::string>& _additional_card_data = "");
  56. + const std::vector<std::string>& _additional_card_data = {});
  57. template<typename T>
  58. std::shared_ptr<Element> add_elementByNodeIndex(
  59. T _id,
  60. T _part_id,
  61. const std::vector<size_t>& _node_indexes,
  62. - const std::vector<std::string>& _additional_card_data = "");
  63. + const std::vector<std::string>& _additional_card_data = {});
  64. std::vector<std::shared_ptr<Element>> get_elements();
  65. std::string str() override;
  66. };