Ticket #13470: 0001-Remove-Spurious-B_BEOS_DATA_DIRECTORY.patch

File 0001-Remove-Spurious-B_BEOS_DATA_DIRECTORY.patch, 2.2 KB (added by AGMS, 2 years ago)

Patch for removing the symbol and updating the documentation.

  • docs/user/storage/FindDirectory.dox

    From 34c14bab0c499f60ca94d042a9800af3a7de0013 Mon Sep 17 00:00:00 2001
    From: "Alexander G. M. Smith" <agmsmith@ncf.ca>
    Date: Wed, 3 May 2017 19:33:43 +0000
    Subject: [PATCH] Remove Spurious B_BEOS_DATA_DIRECTORY
    
    There is no DATA directory in BeOS, and its FindDir() doesn't implement
    it.  No need for a confusing backwards compatibility to something that
    doesn't exist (had my hopes up, was going to move some non-executable
    files from AddOns to Data in a program that works in BeOS and Haiku).
    
    The removed enum label doesn't change the directory_which enum order
    or count, as it was aliasing the value of another existing enum label
    (B_SYSTEM_DATA_DIRECTORY).
    
    Fixes #13470
    ---
     docs/user/storage/FindDirectory.dox | 11 -----------
     headers/os/storage/FindDirectory.h  |  1 -
     src/bin/finddir.c                   |  1 -
     3 files changed, 13 deletions(-)
    
    diff --git a/docs/user/storage/FindDirectory.dox b/docs/user/storage/FindDirectory.dox
    index eacfa77..e1bad23 100644
    a b  
    922922*/
    923923
    924924
    925 /*!
    926     \var directory_which B_BEOS_DATA_DIRECTORY
    927     \brief The BeOS data directory.
    928 
    929     \deprecated Legacy BeOS definition to be phased out, use
    930                 \c B_SYSTEM_DATA_DIRECTORY instead.
    931 
    932     \since BeOS R3
    933 */
    934 
    935 
    936925//// find_path[s]() flags
    937926
    938927
  • headers/os/storage/FindDirectory.h

    diff --git a/headers/os/storage/FindDirectory.h b/headers/os/storage/FindDirectory.h
    index cd12c6b..67ff177 100644
    a b typedef enum {  
    117117    B_BEOS_TRANSLATORS_DIRECTORY,
    118118    B_BEOS_MEDIA_NODES_DIRECTORY,
    119119    B_BEOS_SOUNDS_DIRECTORY,
    120     B_BEOS_DATA_DIRECTORY,
    121120} directory_which;
    122121
    123122
  • src/bin/finddir.c

    diff --git a/src/bin/finddir.c b/src/bin/finddir.c
    index 329ff78..c9ca6ce 100644
    a b directoryType directoryTypes[] = {  
    128128    KEYVALUE_PAIR(B_BEOS_TRANSLATORS_DIRECTORY),
    129129    KEYVALUE_PAIR(B_BEOS_MEDIA_NODES_DIRECTORY),
    130130    KEYVALUE_PAIR(B_BEOS_SOUNDS_DIRECTORY),
    131     KEYVALUE_PAIR(B_BEOS_DATA_DIRECTORY),
    132131
    133132    // Legacy "common" directories, for BeOS compatibility only.
    134133    {"B_COMMON_DIRECTORY", B_SYSTEM_NONPACKAGED_DIRECTORY},