util  Check-in [352d72f9c6]

Overview
Comment:fix make instructions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 352d72f9c637de10b239462feacfb103ce9a9dbe9f7a2ae229c621d504a1f735
User & Date: lexi on 2019-07-25 23:59:40
Other Links: manifest | tags
Context
2019-07-28
12:40
add fabulist collaborative interaction fiction server (keeping it here until it gets its own repo) check-in: 9259bf507d user: lexi tags: trunk
2019-07-25
23:59
fix make instructions check-in: 352d72f9c6 user: lexi tags: trunk
23:29
remove debug code oops check-in: 6db4e12bdd user: lexi tags: trunk
Changes

Modified makefile from [6d462c849e] to [bb9a75f0d8].

    14     14     # procedural generators
    15     15   conv: ord
    16     16     # converters
    17     17   ctl: nkvd.so bgrd
    18     18     # manipulating disobedient software
    19     19   
    20     20   nkvd.so: nkvd.c
    21         -	$(CC) -fPIC -pie $< -o$@ -Wl,-E -ldl $(nkvd-flags)
           21  +	$(CC) -fPIC -pie -shared $< -o$@ -Wl,-E -ldl $(nkvd-flags)
    22     22   
    23     23   bgrd: bgrd.c
    24     24   	$(cc) $< -lutil -o$@ $(cc-post)
    25     25   
    26     26   safekill: safekill.c
    27     27   	$(cc) $< -lX11 -o$@ $(cc-post)
    28     28   
    29     29   xpriv: xpriv.c
    30     30   	$(cc) $< -lrt -lutil -lX11 -o $@ $(cc-post)

Modified nkvd.c from [6fd3f35c89] to [6971590b48].

     1      1   /* [ʞ] nkvd.c - XDG directory enforcer
     2      2    *  ~ lexi hale  <lexi@hale.su>
     3      3    *  © AGPLv3
     4         - *  $ cc -fPIC -pie nkvd.c -Wl,-E -onkvd -ldl
            4  + *  $ cc -fPIC -pie -shared nkvd.c -Wl,-E -onkvd -ldl
     5      5    *       [-D_NO_GNU [-D_LIBC=…]] [-D_CONF_HOME=…]
     6      6    *  $ export LD_PRELOAD=nkvd.so <dissident>
     7      7    *
     8      8    *  ! NOTE:  for unknown reasons,  nkvd currently only works
     9      9    *    when  built without optimizations.  it's probably that
    10     10    *    wrecker Trotsky's fault. i'm working on it.
    11     11    *    - partial solution on GCC: using #pragma to disable
    12     12    *      optimization around the sensitive code. unclear if
    13     13    *      this bug affects other compilers.
    14     14    *    - bizarre complication: the bug can only be reproduced
    15     15    *      if  the -O flag  itself is present;  turning on  the 
    16     16    *      same  individual  optimization flags that  -O<x>  is 
    17     17    *      supposed to represent does not trigger the problem.
    18         - *    - conclusion: compiler devils.
           18  + *    - conclusion: compiler devils
    19     19    *
    20     20    *  ! WARNING: test this program thoroughly before you start
    21     21    *    exporting it from your shellrcs; if things get fucked,
    22     22    *    you  may not be able to execute any binaries with  the
    23     23    *    variable set,  and will need to log in as root or boot
    24     24    *    off  a rescue disk  to fix the problem.  LD_PRELOAD is
    25     25    *    not a toy. you have been warned.
................................................................................
   134    134   #		define SYMSRC RTLD_NEXT
   135    135   #	else
   136    136   #		define SYMSRC hnd
   137    137   #	endif
   138    138   #endif
   139    139   #include <string.h>
   140    140   #include <dlfcn.h>
   141         -#include <stdio.h>
   142    141   
   143    142   #ifndef _LIBC
   144    143   #	define _LIBC "libc.so.6"
   145    144   #endif
   146    145   
   147    146   #ifndef _CONF_HOME
   148    147   #	define _CONF_HOME ".config"
   149    148   #endif
   150         -
   151    149   
   152    150   #define pstr(x) x,sizeof x
   153    151   #define hl(txt) "\x1b[1;31m" txt "\x1b[m"
   154    152   #define bold(txt) "\x1b[1m" txt "\x1b[21m"
   155    153   #define e_fatal hl("(nkvd fatal)") " "
   156    154   #define fail(code, err) { write(2,pstr(e_fatal " " err)); _exit(code); }
   157    155   #define dbg(x) write(2,pstr(bold("(nkvd)") " " x))