nix,vere: move ivory def to its own source file

This commit is contained in:
Jōshin 2021-12-26 22:31:35 +00:00
parent fbcec9d0ec
commit 0682eb8a3a
No known key found for this signature in database
GPG Key ID: A8BE5A9A521639D0
6 changed files with 12 additions and 11 deletions

View File

@ -34,7 +34,7 @@ in {
mkdir -p $out/include
cat $src > $file
xxd -i $file > $out/include/ivory.h
xxd -i $file > $out/include/ivory_impl.h
'';
preferLocalBuild = true;

View File

@ -0,0 +1,7 @@
#ifndef UR_IVORY_H
#define UR_IVORY_H
extern unsigned char u3_Ivory_pill[];
extern unsigned int u3_Ivory_pill_len;
#endif

View File

@ -4,6 +4,7 @@
#include "ur/defs.h"
#include "ur/bitstream.h"
#include "ur/hashcons.h"
#include "ur/ivory.h"
#include "ur/serial.h"
#endif /* ifndef UR_H */

View File

@ -2,14 +2,6 @@
#include "vere/vere.h"
#include "ur/ur.h"
// XX ivory.h just declares these; if it's included elsewhere
// (currently king.c), this will cause duplicate definition
// errors. so we just extern them instead.
//
extern unsigned char u3_Ivory_pill[];
extern unsigned int u3_Ivory_pill_len;
// #include "ivory.h"
/* _setup(): prepare for tests.
*/
static void

3
pkg/urbit/ur/ivory.c Normal file
View File

@ -0,0 +1,3 @@
#include "ur/ivory.h"
#include "ivory_impl.h"

View File

@ -8,8 +8,6 @@
#include <curl/curl.h>
#include <uv.h>
#include "ivory.h"
// stash config flags for worker
//
static c3_w sag_w;