mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Make fixups for libcrypt
This commit is contained in:
parent
9b4701b3bc
commit
e72a88ea70
8 changed files with 30 additions and 16 deletions
|
@ -10,12 +10,8 @@
|
|||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/ok.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/unistd.h"
|
||||
#include "third_party/getopt/long1.h"
|
||||
#include "third_party/musl/crypt.h"
|
||||
#include "third_party/musl/lockf.h"
|
||||
|
||||
#ifndef _CS_PATH
|
||||
#define _CS_PATH 0
|
||||
#endif
|
||||
|
||||
#endif /* _UNISTD_H */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
#include "libc/unistd.h"
|
||||
|
||||
size_t confstr(int name, char *buf, size_t len) {
|
||||
if (name == _CS_PATH) {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STDIO_H_
|
||||
#define COSMOPOLITAN_LIBC_STDIO_H_
|
||||
|
||||
#define EOF -1 /* end of file */
|
||||
#define WEOF -1u /* end of file (multibyte) */
|
||||
#define _IOFBF 0 /* fully buffered */
|
||||
#define _IOLBF 1 /* line buffered */
|
||||
#define _IONBF 2 /* no buffering */
|
||||
#define _CS_PATH 0
|
||||
#define EOF -1 /* end of file */
|
||||
#define WEOF -1u /* end of file (multibyte) */
|
||||
#define _IOFBF 0 /* fully buffered */
|
||||
#define _IOLBF 1 /* line buffered */
|
||||
#define _IONBF 2 /* no buffering */
|
||||
|
||||
#define L_tmpnam 20
|
||||
#define L_ctermid 20
|
||||
|
|
|
@ -6,5 +6,10 @@ char *fcvt(double, int, int *, int *) libcesque;
|
|||
char *ecvt(double, int, int *, int *) libcesque;
|
||||
char *gcvt(double, int, char *) libcesque;
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || \
|
||||
defined(_COSMO_SOURCE)
|
||||
void setkey(const char *) libcesque;
|
||||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* COSMOPOLITAN_LIBC_STDLIB_H_ */
|
||||
|
|
14
libc/unistd.h
Normal file
14
libc/unistd.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_UNISTD_H_
|
||||
#define COSMOPOLITAN_LIBC_UNISTD_H_
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define _CS_PATH 0
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || \
|
||||
defined(_COSMO_SOURCE)
|
||||
void encrypt(char *, int) libcesque;
|
||||
char *crypt(const char *, const char *) libcesque;
|
||||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* COSMOPOLITAN_LIBC_UNISTD_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue