add Solaris compatibility stubs

This commit is contained in:
Georg Sauthoff 2016-08-21 15:20:41 +02:00
parent 7f43353e56
commit c0dfa85aa1
5 changed files with 42 additions and 0 deletions

View file

@ -25,6 +25,7 @@ add_executable(somake
bin/main.cc bin/misc.cc bin/nse_printdep.cc bin/parallel.cc
bin/pmake.cc bin/read.cc bin/read2.cc bin/rep.cc
bin/state.cc
comp/progname.c
)
set_property(TARGET somake mksh vroot PROPERTY INCLUDE_DIRECTORIES

10
comp/namelen.h Normal file
View file

@ -0,0 +1,10 @@
// 2016, Georg Sauthoff <mail@georg.so>, CDDL
#ifndef COMP_NAMELEN_H
#define COMP_NAMELEN_H
#if defined(sun) || defined(__sun)
#else
#define MAXNAMELEN 1024
#endif
#endif

8
comp/progname.c Normal file
View file

@ -0,0 +1,8 @@
// 2016, Georg Sauthoff <mail@georg.so>, CDDL
#include "progname.h"
const char *getprogname()
{
// XXX
return "somake";
}

13
comp/progname.h Normal file
View file

@ -0,0 +1,13 @@
// 2016, Georg Sauthoff <mail@georg.so>, CDDL
#ifndef COMP_PROGNAME_H
#define COMP_PROGNAME_H
#ifdef __cplusplus
extern "C" {
#endif
const char *getprogname();
#ifdef __cplusplus
}
#endif
#endif

10
comp/timestruc_t.h Normal file
View file

@ -0,0 +1,10 @@
// 2016, Georg Sauthoff <mail@georg.so>, CDDL
#ifndef COMP_TIMESTRUC_T_H
#define COMP_TIMESTRUC_T_H
#if defined(sun) || defined(__sun)
#else
typedef struct timespec timestruc_t;
#endif
#endif