1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Remove Microsoft/Cygwin import/export nonsense

Windows/Cygwin requires onerous special handling and the definition
of additional _imp__* symbols to import/export symbols between
dynamically linked binaries. Its support in AST used a lot of
macros and code obfuscation. In the features/common test for this,
AT&T called this the "Microsoft import/export nonsense".

They're right, it's nonsense. Somehow, Microsoft's POSIX layer,
SFU/Interix, always managed without it. No one has time to maintain
this (especially considering how incredibly sluggish Cygwin is).
And in fact, it had already fallen victim to bit rot; I confirmed
this in my early experiments with reintroducing dynamic library
support. No one has time to fix it, either.

So, my apologies to any Cygwin fans; ksh 93u+m will never support
dynamically loadable built-ins on Cygwin, even when I do manage to
reintroduce dynamic linking properly.
This commit is contained in:
Martijn Dekker 2022-07-21 18:26:42 +02:00
parent 4c0df0e617
commit 3de4da5afb
143 changed files with 125 additions and 1083 deletions

View file

@ -63,10 +63,6 @@
/* entry point for shell special builtins */
#if defined(__EXPORT__)
# define extern __EXPORT__
#endif
extern int b_alias(int, char*[],Shbltin_t*);
extern int b_break(int, char*[],Shbltin_t*);
extern int b_dot_cmd(int, char*[],Shbltin_t*);
@ -129,8 +125,6 @@ extern int b_times(int, char*[],Shbltin_t*);
extern short b_enum_nelem(Namfun_t*);
#undef extern
extern const char e_alrm1[];
extern const char e_alrm2[];
extern const char e_badfun[];

View file

@ -59,9 +59,6 @@ extern int sh_iorenumber(int,int);
extern void sh_pclose(int[]);
extern int sh_rpipe(int[]);
extern void sh_iorestore(int,int);
#if defined(__EXPORT__) && defined(_BLD_DLL)
__EXPORT__
#endif
extern Sfio_t *sh_iostream(int);
extern int sh_redirect(struct ionod*,int);
extern void sh_iosave(int,int,char*);

View file

@ -237,9 +237,6 @@ struct Namval
#define NV_DCADD 0 /* used to add named disciplines */
#define NV_DCRESTRICT 1 /* variable that are restricted in rsh */
#if defined(__EXPORT__) && defined(_DLL)
# define extern __EXPORT__
#endif /* _DLL */
/* prototype for array interface */
extern Namarr_t *nv_arrayptr(Namval_t*);
extern Namarr_t *nv_setarray(Namval_t*,void*(*)(Namval_t*,const char*,int));
@ -289,10 +286,6 @@ extern Namval_t *nv_type(Namval_t*);
extern void nv_addtype(Namval_t*,const char*, Optdisc_t*, size_t);
extern const Namdisc_t *nv_discfun(int);
#ifdef _DLL
# undef extern
#endif /* _DLL */
#define nv_unset(np) _nv_unset(np,0)
#define nv_size(np) nv_setsize((np),-1)
#define nv_stack(np,nf) nv_disc(np,nf,0)

View file

@ -83,12 +83,8 @@ extern char *path_fullname(const char*);
extern int path_expand(const char*, struct argnod**);
extern noreturn void path_exec(const char*,char*[],struct argnod*);
extern pid_t path_spawn(const char*,char*[],char*[],Pathcomp_t*,int);
#if defined(__EXPORT__) && defined(_BLD_DLL)
# define extern __EXPORT__
#endif
extern int path_open(const char*,Pathcomp_t*);
extern Pathcomp_t *path_get(const char*);
#undef extern
extern char *path_pwd(void);
extern Pathcomp_t *path_nextcomp(Pathcomp_t*,const char*,Pathcomp_t*);
extern int path_search(const char*,Pathcomp_t**,int);

View file

@ -419,10 +419,6 @@ extern Libcomp_t *liblist;
#undef getenv /* -lshell provides its own */
#if defined(__EXPORT__) && defined(_DLL)
# define extern __EXPORT__
#endif /* _DLL */
extern void sh_subfork(void);
extern Shell_t *sh_init(int,char*[],Shinit_f);
extern int sh_reinit(char*[]);
@ -472,10 +468,6 @@ extern int sh_exec(const Shnode_t*,int);
extern Shell_t sh;
#define sh_getinterp() (&sh)
#ifdef _DLL
# undef extern
#endif /* _DLL */
#define chdir(a) sh_chdir(a)
#define fchdir(a) sh_fchdir(a)
#ifndef defs_h_defined

View file

@ -212,9 +212,6 @@ union Shnode_u
extern void sh_freeup(void);
extern void sh_funstaks(struct slnod*,int);
extern Sfio_t *sh_subshell(Shnode_t*, volatile int, int);
#if defined(__EXPORT__) && defined(_BLD_DLL)
__EXPORT__
#endif
extern int sh_tdump(Sfio_t*, const Shnode_t*);
extern Shnode_t *sh_trestore(Sfio_t*);

View file

@ -32,9 +32,6 @@
#include "timeout.h"
Shell_t sh = {0};
#ifdef __IMPORT__
Shell_t *_imp__sh = &sh;
#endif
Dtdisc_t _Nvdisc =
{

View file

@ -135,10 +135,6 @@ void fcnotify(void (*fun)(Sfio_t*,const char*,int,void*),void* context)
_Fcin.context = context;
}
#ifdef __EXPORT__
# define extern __EXPORT__
#endif
#undef fcsave
extern void fcsave(Fcin_t *fp)
{

View file

@ -969,10 +969,6 @@ Sfdouble_t arith_strval(const char *s, char **end, Sfdouble_t(*convert)(const ch
#undef error
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
#ifndef DOMAIN
#define DOMAIN _DOMAIN
#endif
@ -1010,6 +1006,4 @@ Sfdouble_t arith_strval(const char *s, char **end, Sfdouble_t(*convert)(const ch
UNREACHABLE();
}
#undef extern
#endif /* _mem_name_exception */

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -75,31 +75,6 @@ typedef struct _dtlib_s
Dtmethod_t** methods; /* method list */
} Dtlib_t;
#if _BLD_cdt
#define CDTLIB(m) __DEFINE__(Dtmethod_t*,m,&_##m);
#else
#define CDTLIB(m) \
void* cdt_lib(const char* name, Dtdisc_t* disc, const char* type) \
{ \
int i; \
int n; \
if (!type) \
return &cdt_lib_##m; \
n = strlen(cdt_lib_##m.prefix); \
if (!strncmp(type, cdt_lib_##m.prefix, n)) \
type += n; \
for (i = 0; cdt_lib_##m.methods[i]; i++) \
if (!strcmp(type, cdt_lib_##m.methods[i]->name + n)) \
return cdt_lib_##m.methods[i]; \
return 0; \
} \
unsigned long plugin_version(void) { return CDT_PLUGIN_VERSION; }
#endif /* _BLD_cdt */
/* these macros lock/unlock dictionaries. DTRETURN substitutes for "return" */
#define DTSETLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_LOCK) : 0 )
#define DTCLRLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_UNLOCK) : 0 )
@ -139,16 +114,10 @@ typedef struct _dtlib_s
#define LLSHIFT(x,t) ((t) = (x)->_rght->_rght, (x)->_rght->_rght = (t)->_left, \
(t)->_left = (x), (x) = (t) )
#if _BLD_cdt && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Dtlink_t* _dtmake(Dt_t*, void*, int);
extern void _dtfree(Dt_t*, Dtlink_t*, int);
extern int _dtlock(Dt_t*, int);
#undef extern
#if !_PACKAGE_ast
extern void* malloc(size_t);
extern void* realloc(void*, size_t);

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -26,10 +26,6 @@
#include <cdt.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
#undef dtflatten
extern Dtlink_t* dtflatten(Dt_t* d)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2012 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -432,15 +432,12 @@ static int hashevent(Dt_t* dt, int event, void* arg)
static Dtmethod_t _Dtset = { dthashchain, DT_SET, hashevent, "Dtset" };
static Dtmethod_t _Dtbag = { dthashchain, DT_BAG, hashevent, "Dtbag" };
__DEFINE__(Dtmethod_t*,Dtset,&_Dtset);
__DEFINE__(Dtmethod_t*,Dtbag,&_Dtbag);
Dtmethod_t *Dtset = &_Dtset;
Dtmethod_t *Dtbag = &_Dtbag;
/* backwards compatibility */
#undef Dthash
#if defined(__EXPORT__)
__EXPORT__
#endif
__DEFINE__(Dtmethod_t*,Dthash,&_Dtset);
Dtmethod_t *Dthash = &_Dtset;
#ifdef NoF
NoF(dthashchain)

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2012 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -337,10 +337,10 @@ static Dtmethod_t _Dtdeque = { dtlist, DT_DEQUE, listevent, "Dtdeque" };
static Dtmethod_t _Dtstack = { dtlist, DT_STACK, listevent, "Dtstack" };
static Dtmethod_t _Dtqueue = { dtlist, DT_QUEUE, listevent, "Dtqueue" };
__DEFINE__(Dtmethod_t*,Dtlist,&_Dtlist);
__DEFINE__(Dtmethod_t*,Dtdeque,&_Dtdeque);
__DEFINE__(Dtmethod_t*,Dtstack,&_Dtstack);
__DEFINE__(Dtmethod_t*,Dtqueue,&_Dtqueue);
Dtmethod_t* Dtlist = &_Dtlist;
Dtmethod_t* Dtdeque = &_Dtdeque;
Dtmethod_t* Dtstack = &_Dtstack;
Dtmethod_t* Dtqueue = &_Dtqueue;
#ifdef NoF
NoF(dtlist)

View file

@ -639,15 +639,12 @@ static int treeevent(Dt_t* dt, int event, void* arg)
/* make this method available */
static Dtmethod_t _Dtoset = { dttree, DT_OSET, treeevent, "Dtoset" };
static Dtmethod_t _Dtobag = { dttree, DT_OBAG, treeevent, "Dtobag" };
__DEFINE__(Dtmethod_t*,Dtoset,&_Dtoset);
__DEFINE__(Dtmethod_t*,Dtobag,&_Dtobag);
Dtmethod_t *Dtoset = &_Dtoset;
Dtmethod_t *Dtobag = &_Dtobag;
/* backwards compatibility */
#undef Dttree
#if defined(__EXPORT__)
__EXPORT__
#endif
__DEFINE__(Dtmethod_t*,Dttree,&_Dtoset);
Dtmethod_t *Dttree = &_Dtoset;
#ifdef NoF
NoF(dttree)

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -26,10 +26,6 @@
#include <ast_std.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char *basename(register char *pathname)
{
register char *first, *last;

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -26,10 +26,6 @@
#include <ast_std.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char *dirname(register char *pathname)
{
register char *last;

View file

@ -36,10 +36,6 @@ NoN(eaccess)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
eaccess(const char* path, register int flags)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -31,16 +31,8 @@ NoN(execlp)
#else
#if defined(__EXPORT__)
__EXPORT__ int execlp(const char*, const char*, ...);
#endif
#include <ast.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
execlp(const char* name, const char* arg, ...)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -42,10 +42,6 @@ execsig(int sig)
signal(sig, execsig);
}
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
execve(const char* path, char* const argv[], char* const arge[])
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -31,16 +31,8 @@ NoN(execvp)
#else
#if defined(__EXPORT__)
__EXPORT__ int execvp(const char*, char* const[]);
#endif
#include <ast.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
execvp(const char* name, char* const argv[])
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -31,17 +31,9 @@ NoN(execvpe)
#else
#if defined(__EXPORT__)
__EXPORT__ int execvpe(const char*, char* const[], char* const[]);
#endif
#include <ast.h>
#include <errno.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
execvpe(const char* name, char* const argv[], char* const envv[])
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -108,34 +108,13 @@ typedef struct
#define MM_default (MM_action|MM_label|MM_severity|MM_tag|MM_text)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern const MM_table_t mm_class[];
extern const MM_table_t mm_verb[];
#undef extern
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern const MM_table_t* mm_severity;
#undef extern
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int fmtmsg(long, const char*, int, const char*, const char*, const char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -45,10 +45,6 @@ static const Map_t map[] =
FNM_PERIOD, REG_SHELL_DOT,
};
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
fnmatch(const char* pattern, const char* subject, register int flags)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -50,12 +50,6 @@
#define FNM_NOMATCH 1 /* == REG_NOMATCH */
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int fnmatch(const char*, const char*, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -48,13 +48,7 @@ struct FTW
#define FTW_SKD FTW_SKIP
#define FTW_PRUNE FTW_SKIP
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int ftw(const char*, int(*)(const char*, const struct stat*, int), int);
extern int nftw(const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -43,11 +43,7 @@ NoN(getdate)
#else
#ifndef getdate_err
__DEFINE__(int, getdate_err, 0);
#endif
#if defined(__EXPORT__)
#define extern __EXPORT__
int getdate_err = 0;
#endif
extern struct tm*

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -40,10 +40,6 @@ extern int getgroups(int, int*);
#define ast_getgroups getgroups
#endif
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
ast_getgroups(int len, gid_t* set)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -29,10 +29,6 @@ NoN(getlogin)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char*
getlogin(void)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -36,10 +36,6 @@
extern int getpgrp(int);
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
_ast_getpgrp(void)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -27,26 +27,11 @@
#ifndef _LIBGEN_H
#define _LIBGEN_H
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern char* __loc1;
#undef extern
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char* regcmp(const char*, ...);
extern char* regex(const char*, const char*, ...);
extern char* basename(char*);
extern char* dirname(char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -36,10 +36,6 @@
#undef _def_map_ast
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
static char*
temp(char* buf, int* fdp)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -42,10 +42,6 @@ NoN(mktime)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern time_t
mktime(struct tm* ts)
{

View file

@ -74,10 +74,6 @@ extern int _utime(const char*, const struct utimbuf*);
extern int _utimes(const char*, const struct timeval*);
extern ssize_t _write(int, const void*, size_t);
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if _win32_botch_access
#define sysaccess _access
#else
@ -1118,23 +1114,6 @@ getpagesize()
#endif
#if __CYGWIN__ && defined(__IMPORT__) && defined(__EXPORT__)
#ifndef OMITTED
#define OMITTED 1
#endif
/*
* a few _imp__FUNCTION symbols are needed to avoid
* static link multiple definitions
*/
#ifndef strtod
__EXPORT__ double (*_imp__strtod)(const char*, char**) = strtod;
#endif
#endif
/* Kludge to deal with GCC's overzealous optimizer breaking the pow functions.
*
* Removal of this will break IEEE floating point on the SVR4 platforms.

View file

@ -36,10 +36,6 @@ NoN(putenv)
#undef _def_map_ast
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
putenv(const char* s)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -29,13 +29,7 @@
#ifndef _RE_COMP_H
#define _RE_COMP_H
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char* re_comp(const char*);
extern int re_exec(const char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -37,10 +37,6 @@
extern int resolvepath(const char*, char*, size_t);
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char*
realpath(const char* file, char* path)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -43,7 +43,7 @@ typedef struct
char buf[ALIGN_BOUND2];
} Regex_t;
__DEFINE__(char*, __loc1, 0);
char* __loc1 = 0;
static void*
block(void* handle, void* data, size_t size)

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -60,17 +60,11 @@ typedef struct
#define compile(a,b,c,d) _re_read(&_re_info,a,b,c,d)
#define step(a,b) _re_exec(&_re_info,a,b,0)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int _re_comp(regexp_t*, const char*, char*, unsigned int);
extern int _re_exec(regexp_t*, const char*, const char*, int);
extern char* _re_putc(int);
extern char* _re_read(regexp_t*, const char*, char*, const char*, int);
#undef extern
#ifndef _REGEXP_DECLARE
regexp_t _re_info;

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -36,10 +36,6 @@ NoN(remove)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
remove(const char* path)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -36,10 +36,6 @@
#undef _AST_API_H
#include <ast_api.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
resolvepath(const char* file, char* path, size_t size)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -37,10 +37,6 @@ NoN(setenv)
#undef _def_map_ast
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
setenv(const char* name, const char* value, int overwrite)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -59,10 +59,6 @@ NoN(statvfs)
#define STATFS(a,b) statfs(a,b)
#endif
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
static void
us2v(register struct statfs* ufs, register struct stat* st, register struct statvfs* vfs)
{
@ -111,10 +107,6 @@ statvfs(const char* path, struct statvfs* vfs)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
static void
s2v(register struct stat* st, register struct statvfs* vfs)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -42,10 +42,6 @@ NoN(strftime)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern size_t
strftime(char* buf, size_t len, const char* format, const struct tm* tm)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -40,10 +40,6 @@ NoN(strptime)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char*
strptime(const char* s, const char* format, struct tm* ts)
{

View file

@ -33,10 +33,6 @@ NoN(strstr)
#else
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char*
strstr(register const char* s1, register const char* s2)
{

View file

@ -38,10 +38,6 @@ NoN(swab)
#include <swap.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void
swab(const void* src, void* dst, ssize_t n)
{

View file

@ -103,22 +103,9 @@
#define LOG_FACILITY(p) LOG_FAC(p) /* get facility index from pri */
#define LOG_SEVERITY(p) LOG_PRI(p) /* get severity from pri */
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern const Namval_t log_facility[];
extern const Namval_t log_severity[];
#undef extern
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void closelog(void);
@ -127,6 +114,4 @@ extern int setlogmask(int);
extern void syslog(int, const char*, ...);
extern void vsyslog(int, const char*, va_list);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -36,10 +36,6 @@
#undef _def_map_ast
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int
system(const char* cmd)
{

View file

@ -39,10 +39,6 @@
#undef tempnam
#endif
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char*
tempnam(const char* dir, const char* pfx)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -34,10 +34,6 @@
#undef _def_map_ast
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
#ifndef L_tmpnam
#define L_tmpnam 25
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -27,10 +27,6 @@
#include <ast.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
#define STUB 1
/*

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -36,10 +36,6 @@ NoN(unsetenv)
#undef _def_map_ast
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void
unsetenv(const char *name)
{

View file

@ -33,10 +33,6 @@ NoN(vfork)
#undef vfork
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern pid_t
vfork(void)
{

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -51,13 +51,7 @@ typedef struct _wdarg
size_t we_offs;
} wordexp_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int wordexp(const char*, wordexp_t*, int);
extern int wordfree(wordexp_t*);
#undef extern
#endif /* _WORDEXP_H */

View file

@ -6,13 +6,6 @@ typ __va_list stdio.h
mac SF_APPEND,SF_CLOSE sys/stat.h sys/socket.h
dll import note{ Microsoft import/export nonsense }end execute{
__declspec(dllimport) int foo;
int main() { return foo == 5 ? 0 : 1; }
int bar = 5;
int* _imp__foo = &bar;
}end
std proto note{ standard C prototypes ok }end compile{
extern int foo(int, int);
bar() { foo(1, 1); }
@ -43,6 +36,10 @@ cat{
#define _BEGIN_EXTERNS_
#undef _END_EXTERNS_
#define _END_EXTERNS_
#undef __EXTERN__
#define __EXTERN__(T,obj) extern T obj
#undef __DEFINE__
#define __DEFINE__(T,obj,val) T obj = val
#undef __STD_C
#define __STD_C 1
#undef Void_t
@ -72,35 +69,6 @@ cat{
# define _DLL 1
# endif
#endif
#if _dll_import
# if _BLD_STATIC && !_BLD_DLL
# undef _DLL
# else
# if !defined(_DLL)
# define _DLL 1
# endif
# endif
# if !defined(__EXPORT__) && _BLD_DLL
# define __EXPORT__ __declspec(dllexport)
# endif
# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
# define __IMPORT__ __declspec(dllimport)
# endif
#endif
#if !defined(_astimport)
# if defined(__IMPORT__) && defined(_DLL)
# define _astimport __IMPORT__
# else
# define _astimport extern
# endif
#endif
#if _dll_import && ( !_BLD_DLL || _WINIX )
# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
#else
# define __EXTERN__(T,obj) extern T obj
# define __DEFINE__(T,obj,val) T obj = val
#endif
#if !_hdr_stdnoreturn
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))

View file

@ -89,10 +89,6 @@ tst output{
printf("\n");
printf("#define iconv_init(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))\n");
printf("\n");
printf("#if _BLD_ast && defined(__EXPORT__)\n");
printf("#define extern __EXPORT__\n");
printf("#endif\n");
printf("\n");
printf("extern %siconv_t %siconv_open(const char*, const char*);\n", lib, lib);
printf("extern size_t %siconv(%siconv_t, char**, size_t*, char**, size_t*);\n", lib, lib);
printf("extern int %siconv_close(%siconv_t);\n", lib, lib);
@ -108,8 +104,6 @@ tst output{
printf("#endif\n");
printf("#endif\n");
printf("\n");
printf("#undef extern\n");
printf("\n");
return 0;
}
}end

View file

@ -48,10 +48,6 @@ main()
printf(" * unmapped in native headers included by <ast_std.h>\n");
printf(" */\n");
printf("\n");
printf("#if _BLD_ast && defined(__EXPORT__)\n");
printf("#define extern __EXPORT__\n");
printf("#endif\n");
printf("\n");
#if __MVS__
#undef _map_libc
#define _map_libc 1

View file

@ -51,16 +51,10 @@ tst output{
printf("\n");
printf("typedef void* nl_catd;\n");
printf("\n");
printf("#if _BLD_ast && defined(__EXPORT__)\n");
printf("#define extern __EXPORT__\n");
printf("#endif\n");
printf("\n");
printf("extern nl_catd catopen(const char*, int);\n");
printf("extern char* catgets(nl_catd, int, int, const char*);\n");
printf("extern int catclose(nl_catd);\n");
printf("\n");
printf("#undef extern\n");
printf("\n");
return 0;
}
}end

View file

@ -98,29 +98,14 @@ typedef struct
extern int kill(pid_t, int);
extern int killpg(pid_t, int);
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Sig_info_t sig_info;
#undef extern
#if _lib_sigflag && _npt_sigflag
extern int sigflag(int, int, int);
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_lib_sigflag
extern int sigflag(int, int, int);
#endif
extern int sigcritical(int);
extern int sigunblock(int);
#undef extern'
extern int sigunblock(int);'

View file

@ -230,10 +230,6 @@ cat{
#undef extern
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int _doprnt(const char*, va_list, FILE*);
extern int _doscan(FILE*, const char*, va_list);
extern int asprintf(char**, const char*, ...);
@ -347,19 +343,10 @@ cat{
#else
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern FILE _Sfstdin;
extern FILE _Sfstdout;
extern FILE _Sfstderr;
#undef extern
#define feof(f) (_sf_(f)->_flags&_SF_EOF)
#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
#define fileno(f) (_sf_(f)->_file)
@ -369,14 +356,8 @@ cat{
#define putc(c,f) fputc(c,f)
#define putchar(c) fputc(c,stdout)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int _sffilbuf(FILE*, int);
extern int _sfflsbuf(FILE*, int);
#undef extern
#endif
}end

View file

@ -113,10 +113,6 @@ define X_OK 1
define W_OK 2
define R_OK 4
print #if _BLD_ast && defined(__EXPORT__)
print #define extern __EXPORT__
print #endif
extern _exit void (int)
extern abort void (void)
extern abs int (int)

View file

@ -80,10 +80,6 @@ cat{
#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Time_t tmxdate(const char*, char**, Time_t);
extern Time_t tmxduration(const char*, char**);
extern char* tmxfmt(char*, size_t, const char*, Time_t);

View file

@ -66,10 +66,6 @@ cat{
#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int tvgettime(Tv_t*);
extern int tvsettime(const Tv_t*);
extern int tvcmp(const Tv_t*, const Tv_t*);

View file

@ -103,10 +103,6 @@ cat <<!
typedef char mbstate_t;
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_lib_mbstowcs
extern size_t mbstowcs(wchar_t*, const char*, size_t);
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -75,24 +75,8 @@ typedef struct Asometh_s
const char* details;
} Asometh_t;
#if (_BLD_aso || _BLD_taso) && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !(_BLD_aso || _BLD_taso) && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Asometh_t* asometh(int, void*);
#undef extern
#if _BLD_aso && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_aso && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Asometh_t* _asometh(int, void*);
extern int asoinit(const char*, Asometh_t*, Asodisc_t*);
extern int asolock(unsigned int volatile*, unsigned int, int);
@ -178,6 +162,4 @@ extern uint64_t asodec64(uint64_t volatile*);
extern void* asocasptr(void volatile*, void*, void*);
extern void* asogetptr(void volatile*);
#undef extern
#endif

View file

@ -290,10 +290,6 @@ typedef int (*Ast_confdisc_f)(const char*, const char*, const char*);
typedef int (*Strcmp_context_f)(const char*, const char*, void*);
typedef int (*Strcmp_f)(const char*, const char*);
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char* astgetconf(const char*, const char*, const char*, int, Error_f);
extern char* astconf(const char*, const char*, const char*);
extern Ast_confdisc_f astconfdisc(Ast_confdisc_f);
@ -431,8 +427,6 @@ extern int struniq(char**, int);
extern int strvcmp(const char*, const char*);
extern int wc2utf8(char*, uint32_t);
#undef extern
/*
* C library global data symbols not prototyped by <unistd.h>
*/
@ -464,12 +458,6 @@ extern char** environ;
#undef AST_PLUGIN_VERSION
#define AST_PLUGIN_VERSION(v) ((v)>AST_VERSION?(v):AST_VERSION)
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern unsigned long plugin_version(void);
#undef extern
#endif

View file

@ -128,10 +128,6 @@ struct lconv
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#undef getenv
#define getenv _ast_getenv
@ -231,8 +227,6 @@ extern char* strerror(int);
#define LC_LANG (-AST_LC_LANG)
#endif
#undef extern
#undef strcoll
#if _std_strcoll
#define strcoll _ast_info.collate
@ -279,17 +273,8 @@ typedef struct
} _Ast_info_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern _Ast_info_t _ast_info;
#undef extern
/* direct macro access for bsd crossover */
#if !defined(memcpy) && !defined(_lib_memcpy) && defined(_lib_bcopy)
@ -322,16 +307,10 @@ extern int rename(const char*, const char*);
/* and now introducing prototypes botched by the standard(s) */
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#undef getpgrp
#define getpgrp() _ast_getpgrp()
extern int _ast_getpgrp(void);
#undef extern
/*
* and finally, standard interfaces hijacked by AST
* _AST_STD_I delays headers that require <ast_map.h>

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -48,10 +48,6 @@ typedef struct Ccmap_s
void* data; /* map specific data */
} Ccmap_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern unsigned char* _ccmap(int, int);
extern void* _ccmapcpy(unsigned char*, void*, const void*, size_t);
extern void* _ccmapstr(unsigned char*, void*, size_t);
@ -61,8 +57,6 @@ extern char* ccmapname(int);
extern void* ccnative(void*, const void*, size_t);
extern Ccmap_t* ccmaplist(Ccmap_t*);
#undef extern
#define CCOP(i,o) ((i)==(o)?0:(((o)<<8)|(i)))
#define CCIN(x) ((x)&0xFF)
#define CCOUT(x) (((x)>>8)&0xFF)

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -232,12 +232,6 @@ struct _dtstat_s
#define DT_ERROR 0xbad /* announcing an error */
/* data structures and functions */
#if _BLD_cdt && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_BLD_cdt && defined(__IMPORT__)
#define extern __IMPORT__
#endif
extern Dtmethod_t* Dtset;
extern Dtmethod_t* Dtbag;
@ -266,12 +260,6 @@ extern Dtmethod_t* Dtrhbag;
#endif /*_PACKAGE_ast*/
#undef extern
#if _BLD_cdt && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Dt_t* dtopen(Dtdisc_t*, Dtmethod_t*);
extern int dtclose(Dt_t*);
extern Dt_t* dtview(Dt_t*, Dt_t*);
@ -288,18 +276,8 @@ extern int dtuserevent(Dt_t*, int, void*);
extern Dt_t* _dtopen(Dtdisc_t*, Dtmethod_t*, unsigned long);
#define dtopen(dc,mt) _dtopen((dc), (mt), CDT_VERSION)
#undef extern
#if _PACKAGE_ast && !defined(_CDTLIB_H)
#if _BLD_dll && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void* dllmeth(const char*, const char*, unsigned long);
#undef extern
#endif
/* internal functions for translating among holder, object and key */

View file

@ -74,10 +74,6 @@ typedef struct Cmdarg_s /* cmdopen() handle */
} Cmdarg_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#ifndef cmdopen
extern Cmdarg_t* cmdopen(char**, int, int, const char*, int);
#endif
@ -87,6 +83,4 @@ extern int cmdflush(Cmdarg_t*);
extern int cmdarg(Cmdarg_t*, const char*, int);
extern int cmdclose(Cmdarg_t*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -96,14 +96,8 @@
#define RETURN(x) DEBUG_RETURN(x)
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern double debug_elapsed(int);
extern void debug_fatal(const char*, int);
extern void systrace(const char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -27,15 +27,9 @@
#include <cdt.h>
#include <vmalloc.h>
#if _BLD_cdt && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Dt_t* dtnew(Vmalloc_t*, Dtdisc_t*, Dtmethod_t*);
extern Dt_t* _dtnew(Vmalloc_t*, Dtdisc_t*, Dtmethod_t*, unsigned long);
#undef extern
#define dtnew(v,d,m) _dtnew(v,d,m,CDT_VERSION)
#endif

View file

@ -195,23 +195,10 @@ extern int errno; /* system call error status */
#define ESPIPE 29
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Error_info_t* _error_infop_;
#define error_info (*_error_infop_)
#undef extern
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void error(int, ...);
extern int errormsg(const char*, int, ...);
extern int errorf(void*, void*, int, ...);
@ -221,6 +208,4 @@ extern char* errorx(const char*, const char*, const char*, const char*);
#endif
extern Error_info_t* errorctx(Error_info_t*, int, int);
#undef extern
#endif

View file

@ -72,15 +72,9 @@ typedef struct Find_s
} Find_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Find_t* findopen(const char*, const char*, const char*, Finddisc_t*);
extern char* findread(Find_t*);
extern int findwrite(Find_t*, const char*, size_t, const char*);
extern int findclose(Find_t*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -144,10 +144,6 @@ struct Fts
};
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern FTSENT* fts_children(FTS*, int);
extern int fts_close(FTS*);
extern int fts_flags(void);
@ -157,6 +153,4 @@ extern FTS* fts_open(char* const*, int, int(*)(FTSENT* const*, FTSENT* const*));
extern FTSENT* fts_read(FTS*);
extern int fts_set(FTS*, FTSENT*, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -112,13 +112,7 @@
#define FTW_SKIP FTS_SKIP
#define FTW_STAT FTS_STAT
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int ftwalk(const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*));
extern int ftwflags(void);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -141,13 +141,7 @@ struct _glob_
#define GLOB_APPERR 5
#define GLOB_NOSYS 6
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int glob(const char*, int, int(*)(const char*,int), glob_t*);
extern void globfree(glob_t*);
#undef extern
#endif /* _GLOB_H */

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -181,10 +181,6 @@ struct Hash_table /* hash table information */
#endif
};
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Hash_table_t* hashalloc(Hash_table_t*, ...);
extern void hashdone(Hash_position_t*);
extern void hashdump(Hash_table_t*, int);
@ -197,6 +193,4 @@ extern void hashsize(Hash_table_t*, int);
extern Hash_table_t* hashview(Hash_table_t*, Hash_table_t*);
extern int hashwalk(Hash_table_t*, int, int (*)(const char*, char*, void*), void*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -51,12 +51,6 @@
#define HASHNKEY4(n,c4,c3,c2,c1) HASHKEY5((n)+'a',c4,c3,c2,c1)
#define HASHNKEY5(n,c5,c4,c3,c2,c1) HASHKEY6((n)+'a',c5,c4,c3,c2,c1)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern long strkey(const char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2012 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -28,13 +28,7 @@
#define IP6BITS IP6ADDR
#define IP6PREFIX (IP6ADDR+1)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char* fmtip6(const unsigned char*, int);
extern int strtoip6(const char*, char**, unsigned char*, unsigned char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -73,16 +73,10 @@
#define LS_W_MARK 1 /* LS_MARK field width */
#define LS_W_NAME 9 /* group|user name field width */
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern off_t _iblocks(struct stat*);
extern char* fmtdev(struct stat*);
extern char* fmtfs(struct stat*);
extern char* fmtls(char*, const char*, struct stat*, const char*, const char*, int);
extern int pathstat(const char*, struct stat*);
#undef extern
#endif

View file

@ -71,16 +71,10 @@ typedef struct Magic_s
} Magic_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Magic_t* magicopen(Magicdisc_t*);
extern int magicload(Magic_t*, const char*, unsigned long);
extern int magiclist(Magic_t*, Sfio_t*);
extern char* magictype(Magic_t*, Sfio_t*, const char*, struct stat*);
extern int magicclose(Magic_t*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -79,10 +79,6 @@ typedef struct Mc_s
#endif
} Mc_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char* mcfind(const char*, const char*, int, int, char*, size_t);
extern Mc_t* mcopen(Sfio_t*);
extern char* mcget(Mc_t*, int, int, const char*);
@ -91,6 +87,4 @@ extern int mcdump(Mc_t*, Sfio_t*);
extern int mcindex(const char*, char**, int*, int*);
extern int mcclose(Mc_t*);
#undef extern
#endif

View file

@ -72,10 +72,6 @@ struct Mime_s
};
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Mime_t* mimeopen(Mimedisc_t*);
extern int mimeload(Mime_t*, const char*, unsigned long);
extern int mimelist(Mime_t*, Sfio_t*, const char*);
@ -86,6 +82,4 @@ extern char* mimeview(Mime_t*, const char*, const char*, const char*, const char
extern int mimehead(Mime_t*, void*, size_t, size_t, char*);
extern int mimecmp(const char*, const char*, char**);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -44,15 +44,9 @@ typedef struct
int flags; /* MNT_* flags */
} Mnt_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void* mntopen(const char*, const char*);
extern Mnt_t* mntread(void*);
extern int mntwrite(void*, const Mnt_t*);
extern int mntclose(void*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -32,15 +32,9 @@
#include <ast_fs.h>
#include <modecanon.h>
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int modei(int);
extern int modex(int);
#undef extern
#if _S_IDPERM
#define modei(m) ((m)&X_IPERM)
#if _S_IDTYPE

View file

@ -74,25 +74,12 @@ typedef struct Opt_s
_OPT_PRIVATE_
} Opt_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Opt_t* _opt_infop_;
#define opt_info (*_opt_infop_)
#undef extern
#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int optget(char**, const char*);
extern int optjoin(char**, ...);
extern char* opthelp(const char*, const char*);
@ -101,6 +88,4 @@ extern int optstr(const char*, const char*);
extern int optesc(Sfio_t*, const char*, int);
extern Opt_t* optctx(Opt_t*, Opt_t*);
#undef extern
#endif

View file

@ -94,15 +94,9 @@ _PROC_PRIVATE_
} Proc_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int procclose(Proc_t*);
extern int procfree(Proc_t*);
extern Proc_t* procopen(const char*, char**, char**, long*, int);
extern int procrun(const char*, char**, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -69,15 +69,9 @@ typedef uint32_t Recfmt_t;
#define REC_N_TYPE() 0xffffffff
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern char* fmtrec(Recfmt_t, int);
extern Recfmt_t recfmt(const void*, size_t, off_t);
extern Recfmt_t recstr(const char*, char**);
extern ssize_t reclen(Recfmt_t, const void*, size_t);
#undef extern
#endif

View file

@ -195,10 +195,6 @@ struct regex_s
#define reginit(disc) (memset(disc,0,sizeof(*(disc))),(disc)->re_version=REG_VERSION)
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int regcomp(regex_t*, const char*, regflags_t);
extern size_t regerror(int, const regex_t*, char*, size_t);
extern int regexec(const regex_t*, const char*, size_t, regmatch_t*, regflags_t);
@ -249,6 +245,4 @@ struct _sfio_s;
extern void regalloc(void*, regresize_t, regflags_t);
extern int regsub(const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -33,10 +33,6 @@
#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#define SFSK_DISCARD SFDCEVENT('S','K',1)
/*
@ -65,6 +61,4 @@ extern int sfdcunion(Sfio_t*, Sfio_t**, int);
extern Sfio_t* sfdcsubstream(Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t);
#undef extern
#endif

View file

@ -192,13 +192,6 @@ struct _sffmt_s
#define SF_CLOSE SF_CLOSING /* AIX sys/socket.h */
#endif
#if _BLD_sfio && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_sfio && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern ssize_t _Sfi;
extern ssize_t _Sfmaxr;
@ -211,12 +204,6 @@ extern Sfio_t _Sfstdin;
extern Sfio_t _Sfstdout;
extern Sfio_t _Sfstderr;
#undef extern
#if _BLD_sfio && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Sfio_t* sfnew(Sfio_t*, void*, size_t, int, int);
extern Sfio_t* sfopen(Sfio_t*, const char*, const char*);
extern Sfio_t* sfpopen(Sfio_t*, const char*, const char*);
@ -305,8 +292,6 @@ extern ssize_t sfvalue(Sfio_t*);
extern ssize_t sfslen(void);
extern ssize_t sfmaxr(ssize_t, int);
#undef extern
/* coding long integers in a portable and compact fashion */
#define SF_SBITS 6
#define SF_UBITS 7

View file

@ -93,12 +93,6 @@ struct Shbltin_s
# endif
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int astintercept(Shbltin_t*, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -66,10 +66,6 @@ struct stacktable /* stack information */
#define popstack stackpop
#define posstack stacktell
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern STACK stackalloc(int, void*);
extern void stackfree(STACK);
extern void stackclear(STACK);
@ -78,6 +74,4 @@ extern int stackpush(STACK, void*);
extern int stackpop(STACK);
extern void stacktell(STACK, int, STACKPOS*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -47,21 +47,8 @@
#define stktell(sp) ((sp)->_next-(sp)->_data)
#define stkseek(sp,n) ((n)==0?(char*)((sp)->_next=(sp)->_data):_stkseek(sp,n))
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Sfio_t _Stk_data;
#undef extern
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Stk_t* stkopen(int);
extern Stk_t* stkinstall(Stk_t*, char*(*)(int));
extern int stkclose(Stk_t*);
@ -73,6 +60,4 @@ extern char* _stkseek(Stk_t*, ssize_t);
extern char* stkfreeze(Stk_t*, size_t);
extern int stkon(Stk_t*, char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -39,15 +39,9 @@
#define SWAPOP(n) (((n)&int_swap)^(n))
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void* swapmem(int, const void*, void*, size_t);
extern intmax_t swapget(int, const void*, int);
extern void* swapput(int, void*, int, intmax_t);
extern int swapop(const void*, const void*, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -43,12 +43,6 @@
#define _TIMES_H
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int touch(const char*, time_t, time_t, int);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -148,25 +148,12 @@ typedef struct Tm_s
Tm_zone_t* tm_zone;
} Tm_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
#if !_BLD_ast && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
extern Tm_data_t* _tm_datap_;
extern Tm_info_t* _tm_infop_;
#define tm_data (*_tm_datap_)
#define tm_info (*_tm_infop_)
#undef extern
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern time_t tmdate(const char*, char**, time_t*);
extern int tmequiv(Tm_t*);
extern Tm_t* tmfix(Tm_t*);
@ -187,6 +174,4 @@ extern int tmweek(Tm_t*, int, int, int);
extern int tmword(const char*, char**, const char*, char**, int);
extern Tm_zone_t* tmzone(const char*, char**, const char*, int*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -32,16 +32,10 @@
#include <ast.h>
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern Sfio_t* tokline(const char*, int, int*);
extern int tokscan(char*, char**, const char*, ...);
extern char* tokopen(char*, int);
extern void tokclose(char*);
extern char* tokread(char*);
#undef extern
#endif

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -30,16 +30,10 @@
#ifndef _VECARGS_H
#define _VECARGS_H
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int vecargs(char**, int*, char***);
extern char** vecfile(const char*);
extern void vecfree(char**, int);
extern char** vecload(char*);
extern char** vecstring(const char*);
#undef extern
#endif

Some files were not shown because too many files have changed in this diff Show more