Home | History | Annotate | Download | only in bsdiff
      1 // Copyright 2015 The Chromium OS Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef _BSDIFF_BSDIFF_H_
      6 #define _BSDIFF_BSDIFF_H_
      7 
      8 #include <sys/types.h>
      9 
     10 #if _FILE_OFFSET_BITS == 64
     11 #include "divsufsort64.h"
     12 #define saidx_t saidx64_t
     13 #define divsufsort divsufsort64
     14 #else
     15 #include "divsufsort.h"
     16 #endif
     17 
     18 namespace bsdiff {
     19 
     20 int bsdiff(const char* old_filename,
     21            const char* new_filename,
     22            const char* patch_filename);
     23 
     24 int bsdiff(const u_char* old_buf,
     25            off_t oldsize,
     26            const u_char* new_buf,
     27            off_t newsize,
     28            const char* patch_filename,
     29            saidx_t** I_cache);
     30 
     31 }  // namespace bsdiff
     32 
     33 #endif  // _BSDIFF_BSDIFF_H_
     34