Skip to content

Commit

Permalink
Merge branch 'mr/guitton/77-vxworks-support-in-minimal' into 'master'
Browse files Browse the repository at this point in the history
gnatcoll_minimal: Add support for VxWorks

See merge request eng/toolchain/gnatcoll-core!138
  • Loading branch information
JeromeGuittonAdaCore committed Sep 2, 2024
2 parents 4a6d18f + 46f3743 commit 8b6130c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ endif
prefix := $(dir $(shell $(WHICH) gnatls))..

GNATCOLL_PROJECTS := yes
GNATCOLL_MINIMAL_ONLY := no
BUILD = PROD
PROCESSORS = 0
ENABLE_SHARED = yes
Expand Down Expand Up @@ -111,7 +112,10 @@ else
endif

$(PYTHON) $(SOURCE_DIR)/minimal/gnatcoll_minimal.gpr.py build $(INSTR_BUILD_OPTS) $(BUILD_ARGS)

ifeq ($(GNATCOLL_MINIMAL_ONLY), no)
$(PYTHON) $(SOURCE_DIR)/core/gnatcoll_core.gpr.py build $(INSTR_BUILD_OPTS) $(BUILD_ARGS)
endif

ifeq ($(GNATCOLL_PROJECTS), yes)
$(PYTHON) $(SOURCE_DIR)/projects/gnatcoll_projects.gpr.py build $(INSTR_BUILD_OPTS) $(BUILD_ARGS)
Expand Down
4 changes: 4 additions & 0 deletions minimal/src/getRSS.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

#endif

#elif defined(__vxworks)
#include "vxWorks.h"
#include <sys/time.h>

#else
#error "Cannot define getPeakRSS( ) or getCurrentRSS( ) for an unknown OS."
#endif
Expand Down
7 changes: 7 additions & 0 deletions minimal/src/gnatcoll_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
#include <windows.h>
#endif

#if defined (__vxworks)
/* S_IREAD is not defined on VxWorks */
#ifndef S_IREAD
#define S_IREAD (S_IRUSR | S_IRGRP | S_IROTH)
#endif
#endif

#ifdef HAVE_SYSLOG
#include <syslog.h>
void
Expand Down

0 comments on commit 8b6130c

Please sign in to comment.